[#215] added Admin UI Private file option toggle
This commit is contained in:
@@ -187,7 +187,9 @@
|
||||
<slot name="options" {interactive} {hasErrors} />
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4 flex">
|
||||
<slot name="beforeNonempty" {interactive} {hasErrors} />
|
||||
|
||||
<div class="col-sm-4">
|
||||
<Field class="form-field form-field-toggle m-0" name="requried" let:uniqueId>
|
||||
<input type="checkbox" id={uniqueId} bind:checked={field.required} />
|
||||
<label for={uniqueId}>
|
||||
@@ -205,6 +207,8 @@
|
||||
</Field>
|
||||
</div>
|
||||
|
||||
<slot name="afterNonempty" {interactive} {hasErrors} />
|
||||
|
||||
{#if !field.toDelete}
|
||||
<div class="col-sm-4 m-l-auto txt-right">
|
||||
<div class="flex-fill" />
|
||||
|
||||
@@ -270,6 +270,32 @@
|
||||
{/if}
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="afterNonempty">
|
||||
<div class="col-sm-4">
|
||||
<Field class="form-field form-field-toggle m-0" name="schema.{key}.options.private" let:uniqueId>
|
||||
<input type="checkbox" id={uniqueId} bind:checked={field.options.private} />
|
||||
<label for={uniqueId}>
|
||||
<span class="txt">Private</span>
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: `Only those with "View API" rule access will be able to preview or download the file(s).\nAuthenticated user can pass a file token via the "token" query param.`,
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
<a
|
||||
href={import.meta.env.PB_PRIVATE_FILE_DOCS}
|
||||
class="toggle-info txt-sm txt-hint m-l-5"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
Learn more
|
||||
</a>
|
||||
</Field>
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
</SchemaField>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user