mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-25 22:40:25 +01:00
added clarification tooltips for the create and update API rules
This commit is contained in:
1 parent
e8a554b4ad
commit
8e39998f63
29 files changed
+124
-99
No files matched your search
@@ -85,9 +85,33 @@
|
||||
<RuleField label="View rule" formKey="viewRule" {collection} bind:rule={collection.viewRule} />
|
||||
|
||||
{#if collection?.type !== "view"}
|
||||
<RuleField label="Create rule" formKey="createRule" {collection} bind:rule={collection.createRule} />
|
||||
<RuleField label="Create rule" formKey="createRule" {collection} bind:rule={collection.createRule}>
|
||||
<svelte:fragment slot="afterLabel" let:isSuperuserOnly>
|
||||
{#if !isSuperuserOnly}
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: `The main record fields hold the values that are going to be inserted in the database.`,
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</RuleField>
|
||||
|
||||
<RuleField label="Update rule" formKey="updateRule" {collection} bind:rule={collection.updateRule} />
|
||||
<RuleField label="Update rule" formKey="updateRule" {collection} bind:rule={collection.updateRule}>
|
||||
<svelte:fragment slot="afterLabel" let:isSuperuserOnly>
|
||||
{#if !isSuperuserOnly}
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: `The main record fields represent the old/existing record field values.\nTo target the newly submitted ones you can use @request.body.*`,
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</RuleField>
|
||||
|
||||
<RuleField label="Delete rule" formKey="deleteRule" {collection} bind:rule={collection.deleteRule} />
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user