feat: backend for warnings, partial frontend for reports
This commit is contained in:
parent
29274287a2
commit
a0bc39bcba
12 changed files with 479 additions and 79 deletions
24
frontend/src/routes/reports/ReportCard.svelte
Normal file
24
frontend/src/routes/reports/ReportCard.svelte
Normal file
|
@ -0,0 +1,24 @@
|
|||
<script lang="ts">
|
||||
import type { Report } from "$lib/api/entities";
|
||||
import { DateTime } from "luxon";
|
||||
import { Button, Card, CardBody, CardFooter, CardHeader } from "sveltestrap";
|
||||
|
||||
export let report: Report;
|
||||
</script>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<strong>#{report.id}</strong> on <a href="/@{report.user_name}">@{report.user_name}</a>
|
||||
({report.user_id}) {#if report.member_id}
|
||||
(member: <a href="/@{report.user_name}/{report.member_name}">{report.member_name}</a>,
|
||||
{report.member_id})
|
||||
{/if}
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<blockquote class="blockquote">{report.reason}</blockquote>
|
||||
</CardBody>
|
||||
<CardFooter>
|
||||
Created {DateTime.fromISO(report.created_at).toLocal().toLocaleString(DateTime.DATETIME_MED)}
|
||||
<slot />
|
||||
</CardFooter>
|
||||
</Card>
|
Loading…
Add table
Add a link
Reference in a new issue