add /edit stub

This commit is contained in:
Yusur 2025-10-23 09:59:18 +02:00
parent 54cafaa1da
commit 248555f7ad
10 changed files with 175 additions and 36 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { RiLoginBoxLine, RiLogoutBoxLine, RiSearch2Line, RiSearchLine, RiSettings3Line } from "svelte-remixicon";
import { RiLoginBoxLine, RiLogoutBoxLine, RiSearch2Line, RiSearchLine, RiSettings3Line, RiShieldStarLine, RiUserLine } from "svelte-remixicon";
import { activePostCount } from "./globals.svelte";
import type { UserEntry } from "./backend";
@ -35,7 +35,17 @@ let enable_search = $derived(user !== null);
<span><a href="/@{user.username}">@{user.username}</a></span>
<span>{user.karma || 0} karma</span>
</div>
<a class="mobileonly" href="/@{user.username}">
<RiUserLine />
</a>
</li>
{#if user.badges && user.badges.indexOf("administrator") >= 0}
<li>
<a href="/admin/">
<RiShieldStarLine />
</a>
</li>
{/if}
<li><a href="/logout" aria-label="Log out" title="Log out"><RiLogoutBoxLine /></a></li>
{:else}
<li><a href="/login" aria-label="Log in" title="Log in"><RiLoginBoxLine /></a></li>