-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathReportBanDialog.svelte
More file actions
31 lines (30 loc) · 975 Bytes
/
ReportBanDialog.svelte
File metadata and controls
31 lines (30 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<script lang="ts">
import {
ChatReportUserOptions,
chatReportUserOptions
} from '../ts/chat-constants';
import {
reportDialog
} from '../ts/storage';
import Dialog from './common/Dialog.svelte';
import type { Writable } from 'svelte/store';
import RadioGroupStore from './common/RadioGroupStore.svelte';
import Button from 'smelte/src/components/Button';
$: optionStore = $reportDialog?.optionStore as Writable<ChatReportUserOptions>;
</script>
<Dialog active={Boolean($reportDialog)} class="max-w-full max-h-full" style="height: 500px; width: 500px;">
<svelte:fragment slot="title">Report User</svelte:fragment>
<div>
<RadioGroupStore
store={optionStore}
items={chatReportUserOptions}
vertical
/>
</div>
<div slot="actions">
<Button on:click={() => {
$reportDialog?.callback($optionStore);
$reportDialog = null;
}} color="error" disabled={!$optionStore}>Report</Button>
</div>
</Dialog>