add report admin panel
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s

This commit is contained in:
2023-09-29 02:08:34 +02:00
parent 37c230575d
commit 722026c938
19 changed files with 423 additions and 26 deletions

View 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>