Moves the login screen from /login to /auth, logout from /logout to /auth/logout (alongside the existing /auth/login and /auth/callback endpoints), and the public profile route from /u/[id] to /user/[id]. AUTH_REDIRECT_URI and AUTH_POST_LOGOUT_URI already point at /auth/callback and / respectively, so no Zitadel config change is needed for the auth move.
24 lines
478 B
Svelte
24 lines
478 B
Svelte
<script lang="ts">
|
|
interface Props {
|
|
name?: string | null;
|
|
ownerUserId?: string | number | null;
|
|
class?: string;
|
|
}
|
|
|
|
let { name, ownerUserId, class: klass = '' }: Props = $props();
|
|
</script>
|
|
|
|
{#if name}
|
|
{#if ownerUserId}
|
|
<a
|
|
href="/user/{ownerUserId}"
|
|
onclick={(e) => e.stopPropagation()}
|
|
class="block max-w-full truncate hover:text-fg-2 hover:underline {klass}"
|
|
>
|
|
{name}
|
|
</a>
|
|
{:else}
|
|
<span class="block truncate {klass}">{name}</span>
|
|
{/if}
|
|
{/if}
|