feat: moderation API

This commit is contained in:
sam 2024-12-17 17:52:32 +01:00
parent 79b8c4799e
commit 36cb1d2043
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
24 changed files with 1535 additions and 45 deletions

View file

@ -9,17 +9,25 @@
NavItem,
} from "@sveltestrap/sveltestrap";
import { page } from "$app/stores";
import type { User, Meta } from "$api/models/index";
import type { Meta, MeUser } from "$api/models/index";
import Logo from "$components/Logo.svelte";
import { t } from "$lib/i18n";
type Props = { user: User | null; meta: Meta };
type Props = { user: MeUser | null; meta: Meta };
let { user, meta }: Props = $props();
let isOpen = $state(true);
const toggleMenu = () => (isOpen = !isOpen);
</script>
{#if user && user.deleted}
<div class="suspended-alert text-center py-3 mb-2 px-2">
<strong>{$t("nav.suspended-account-hint")}</strong>
<br />
<a href="/contact">{$t("nav.appeal-suspension-link")}</a>
</div>
{/if}
<Navbar expand="lg" class="mb-4 mx-2">
<NavbarBrand href="/">
<Logo />
@ -58,6 +66,11 @@
</Navbar>
<style>
.suspended-alert {
color: var(--bs-danger-text-emphasis);
background-color: var(--bs-danger-bg-subtle);
}
/* These exact values make it look almost identical to the SVG version, which is what we want */
#beta-text {
font-size: 0.7em;