feat: web UI chat render, panels, presence + analytics

This commit is contained in:
hh committed 2026-05-31 19:41:37 +02:00
1 parent 75425d1bee
commit ed469ba8dd
83 files changed
+6034 -136

No files matched your search

@@ -0,0 +1,67 @@
<script lang="ts">
import type { LocationView } from "$lib/api/types";
interface Props {
location: LocationView;
}
let { location }: Props = $props();
const hasCoords = $derived(
location.latitude !== null && location.longitude !== null
);
const mapUrl = $derived(
hasCoords
? `https://www.openstreetmap.org/?mlat=${location.latitude}&mlon=${location.longitude}#map=16/${location.latitude}/${location.longitude}`
: null
);
const title = $derived(location.title ?? "Location");
</script>
<svelte:element
this={mapUrl ? "a" : "div"}
class="Location"
href={mapUrl}
target={mapUrl ? "_blank" : undefined}
rel={mapUrl ? "noopener" : undefined}
>
<span class="pin">📍</span>
<div class="info">
<div class="title">{title}</div>
{#if location.address}
<div class="address">{location.address}</div>
{/if}
{#if hasCoords}
<div class="coords">{location.latitude}, {location.longitude}</div>
{/if}
</div>
</svelte:element>
<style lang="scss">
.Location {
display: flex;
align-items: center;
gap: 0.5rem;
min-width: 12rem;
margin-bottom: 0.25rem;
color: inherit;
text-decoration: none;
}
.pin {
font-size: 1.5rem;
line-height: 1;
}
.title {
font-weight: var(--font-weight-medium);
}
.address,
.coords {
font-size: 0.875rem;
color: var(--color-text-secondary);
}
</style>