fix: 'delete data' option
This commit is contained in:
1 parent
83f51f76b0
commit
7003badaa5
1 file changed
+14
-15
@@ -9,6 +9,7 @@
|
|||||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
|
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||||
|
|
||||||
export let open = false
|
export let open = false
|
||||||
let item: Person | undefined
|
let item: Person | undefined
|
||||||
@@ -114,27 +115,25 @@
|
|||||||
<span class="font-bold">{item.name}</span>
|
<span class="font-bold">{item.name}</span>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
{banned ? 'Unbanning' : 'Banning'} from {community
|
{banned ? 'Unbanning' : 'Banning'} from
|
||||||
? community.name
|
<span class="font-bold">{community ? community.name : 'site'}</span>
|
||||||
: 'site'}
|
|
||||||
</p>
|
</p>
|
||||||
<TextArea
|
<TextArea
|
||||||
required
|
required
|
||||||
bind:value={reason}
|
bind:value={reason}
|
||||||
label="Reason"
|
label="Reason"
|
||||||
placeholder="Why are you banning {item.name}?"
|
placeholder="Why are you {banned
|
||||||
/>
|
? 'unbanning'
|
||||||
<div>
|
: 'banning'} {item.name}?"
|
||||||
<label for="delete-data" class="block my-1 font-bold text-sm">
|
|
||||||
<input id="delete-data" type="checkbox" bind:value={deleteData} />
|
|
||||||
Delete data
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<TextInput
|
|
||||||
bind:value={expires}
|
|
||||||
label="Expires (UTC)"
|
|
||||||
placeholder="2024 August 5"
|
|
||||||
/>
|
/>
|
||||||
|
{#if !banned}
|
||||||
|
<Checkbox bind:checked={deleteData}>Delete data</Checkbox>
|
||||||
|
<TextInput
|
||||||
|
bind:value={expires}
|
||||||
|
label="Expires (UTC)"
|
||||||
|
placeholder="2024 August 5"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<Button submit color="primary" {loading} disabled={loading} size="lg">
|
<Button submit color="primary" {loading} disabled={loading} size="lg">
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in new issue
Block a user