Add Prettier and ESLint tooling (Refs #77)
This commit is contained in:
@@ -1,12 +1,40 @@
|
||||
<script lang="ts">
|
||||
import { serverIdentity } from '../server-labels.js';
|
||||
let { name, mapLabel, showGame = true }: { name: string; mapLabel?: string; showGame?: boolean } = $props();
|
||||
let {
|
||||
name,
|
||||
mapLabel,
|
||||
showGame = true
|
||||
}: { name: string; mapLabel?: string; showGame?: boolean } = $props();
|
||||
const identity = $derived(serverIdentity(name));
|
||||
</script>
|
||||
<span class="identity" title={name}><span class="map">{mapLabel ?? identity.map}</span>{#if identity.lobby !== null}<span class="lobby">Lobby {identity.lobby}</span>{/if}{#if showGame && identity.game}<small>{identity.game}</small>{/if}</span>
|
||||
|
||||
<span class="identity" title={name}
|
||||
><span class="map">{mapLabel ?? identity.map}</span>{#if identity.lobby !== null}<span
|
||||
class="lobby">Lobby {identity.lobby}</span
|
||||
>{/if}{#if showGame && identity.game}<small>{identity.game}</small>{/if}</span
|
||||
>
|
||||
|
||||
<style>
|
||||
.identity { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
|
||||
.map { overflow-wrap: anywhere; }
|
||||
.lobby { white-space: nowrap; font-size: max(var(--text-xs), .85em); color: var(--text-secondary); font-weight: var(--weight-medium); }
|
||||
small { font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; font-weight: var(--weight-regular); }
|
||||
.identity {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
.map {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.lobby {
|
||||
white-space: nowrap;
|
||||
font-size: max(var(--text-xs), 0.85em);
|
||||
color: var(--text-secondary);
|
||||
font-weight: var(--weight-medium);
|
||||
}
|
||||
small {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
font-weight: var(--weight-regular);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user