add report admin panel
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
This commit is contained in:
32
src/routes/report/[...url_hash]/+page.svelte
Normal file
32
src/routes/report/[...url_hash]/+page.svelte
Normal file
@@ -0,0 +1,32 @@
|
||||
<script lang="ts">
|
||||
import { fly } from 'svelte/transition';
|
||||
import type { PageData } from './$types';
|
||||
import ReportDraft from './ReportDraft.svelte';
|
||||
import ReportCompleted from './ReportCompleted.svelte';
|
||||
import ReportSubmitted from './ReportSubmitted.svelte';
|
||||
|
||||
export let data: PageData;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<!-- just in case... -->
|
||||
<meta name="robots" content="noindex" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="absolute top-12 grid card w-11/12 xl:w-2/3 2xl:w-1/2 p-6 shadow-lg">
|
||||
{#if data.draft}
|
||||
<div class="col-[1] row-[1]" transition:fly={{ x: -200, duration: 300 }}>
|
||||
<ReportDraft
|
||||
reason={data.reason}
|
||||
reportedName={data.reported.name}
|
||||
on:submit={() => (data.draft = false)}
|
||||
/>
|
||||
</div>
|
||||
{:else if data.status === 'reviewed'}
|
||||
<ReportCompleted />
|
||||
{:else}
|
||||
<div class="col-[1] row-[1]" transition:fly={{ x: 200, duration: 300 }}>
|
||||
<ReportSubmitted />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user