Player names open profiles across the launcher and admin panel
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DjMbLQujBHunCCu5GpsHaT
This commit is contained in:
13 files changed
+82
-24
No files matched your search
@@ -0,0 +1,18 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
import { go } from '../lib/router.svelte';
|
||||
|
||||
// A player's name that opens their profile in the Players page.
|
||||
let { uuid, name = '', children }: { uuid?: string | null; name?: string; children?: Snippet } = $props();
|
||||
</script>
|
||||
|
||||
{#if uuid}
|
||||
<a class="plink" href={`#/users/${uuid}`} title="View {name || 'player'}'s profile" onclick={(e) => { e.preventDefault(); go(`users/${uuid}`); }}>{#if children}{@render children()}{:else}{name}{/if}</a>
|
||||
{:else}
|
||||
{#if children}{@render children()}{:else}{name}{/if}
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.plink { color: inherit; text-decoration: none; border-radius: 4px; }
|
||||
.plink:hover { color: var(--accent, #8b6cff); text-decoration: underline; text-underline-offset: 3px; }
|
||||
</style>
|
||||
Reference in new issue
Block a user