Coves frontend - a photon fork
1<script lang="ts">
2 // @ts-nocheck TODO(coves-migration): remove when moderation modals are migrated to Coves types
3 import { modals } from './moderation.svelte'
4</script>
5
6<!--These weird await hacks are for lazy loading, better network performance-->
7{#if modals.reporting.open}
8 {#await import('./ReportModal.svelte') then { default: ReportModal }}
9 <ReportModal
10 bind:open={modals.reporting.open}
11 bind:item={modals.reporting.item}
12 />
13 {/await}
14{/if}
15{#if modals.removing.open}
16 {#await import('./RemoveModal.svelte') then { default: RemoveModal }}
17 <RemoveModal
18 bind:open={modals.removing.open}
19 item={modals.removing.item}
20 purge={modals.removing.purge}
21 />
22 {/await}
23{/if}
24{#if modals.banning.open}
25 {#await import('./BanModal.svelte') then { default: BanModal }}
26 <BanModal
27 bind:open={modals.banning.open}
28 banned={modals.banning.banned}
29 user={modals.banning.user}
30 community={modals.banning.community}
31 />
32 {/await}
33{/if}
34
35{#if modals.votes.open}
36 {#await import('./ViewVotesModal.svelte') then { default: VotesModal }}
37 <VotesModal bind:open={modals.votes.open} item={modals.votes.item} />
38 {/await}
39{/if}