refactor: Schnellzugriff raus, Event-Kacheln komplett verlinkt
Die Sidebar fuehrt ohnehin ueberall hin, der Schnellzugriff war eine zweite Navigation ohne Mehrwert. Die Kacheln unter "Heute und demnaechst" sind jetzt vollflaechig verlinkt statt ueber einen Button darin -- dasselbe Muster wie in der Event- und der Trailliste. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Ah9PvkL2xB7YkuadnfHRz
This commit is contained in:
parent
e7892be60b
commit
83a1693ef1
1 changed files with 22 additions and 48 deletions
|
|
@ -9,7 +9,7 @@
|
|||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { formatDateRange } from '$lib/time'
|
||||
import { Calendar, Users, Clock, MapPin, Route, UsersRound } from 'lucide-svelte'
|
||||
import { Calendar, Users, Clock, MapPin } from 'lucide-svelte'
|
||||
|
||||
const teams = getTeamContext()
|
||||
const events = getEventContext()
|
||||
|
|
@ -81,33 +81,6 @@
|
|||
</Card>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold mb-4">Schnellzugriff</h2>
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<Card class="hover:border-primary transition-colors">
|
||||
<a href="/dashboard/events" class="block p-6">
|
||||
<Calendar class="h-6 w-6 text-muted-foreground mb-3" />
|
||||
<h3 class="font-semibold">Events</h3>
|
||||
<p class="text-sm text-muted-foreground mt-1">Veranstaltungen und Fahrer</p>
|
||||
</a>
|
||||
</Card>
|
||||
<Card class="hover:border-primary transition-colors">
|
||||
<a href="/dashboard/trails" class="block p-6">
|
||||
<Route class="h-6 w-6 text-muted-foreground mb-3" />
|
||||
<h3 class="font-semibold">Trails</h3>
|
||||
<p class="text-sm text-muted-foreground mt-1">Strecken, Zustand und Meldungen</p>
|
||||
</a>
|
||||
</Card>
|
||||
<Card class="hover:border-primary transition-colors">
|
||||
<a href="/dashboard/settings/team" class="block p-6">
|
||||
<UsersRound class="h-6 w-6 text-muted-foreground mb-3" />
|
||||
<h3 class="font-semibold">Teams</h3>
|
||||
<p class="text-sm text-muted-foreground mt-1">Mitglieder und Rechte</p>
|
||||
</a>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold mb-4">Heute und demnächst</h2>
|
||||
{#if upNext.length === 0}
|
||||
|
|
@ -125,27 +98,28 @@
|
|||
<div class="grid gap-3 sm:grid-cols-2">
|
||||
{#each upNext as event}
|
||||
{@const eventRuns = runs.getByEvent(event.id).length}
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<div class="flex items-start justify-between gap-2">
|
||||
<CardTitle>{event.name || event.description || 'Unbenannt'}</CardTitle>
|
||||
{#if event.starts}
|
||||
<Badge variant="secondary" class="shrink-0">
|
||||
{formatDateRange(event.starts, event.ends)}
|
||||
</Badge>
|
||||
<Card class="hover:border-primary transition-colors">
|
||||
<a href="/dashboard/events/{event.id}" class="block">
|
||||
<CardHeader>
|
||||
<div class="flex items-start justify-between gap-2">
|
||||
<CardTitle>{event.name || event.description || 'Unbenannt'}</CardTitle>
|
||||
{#if event.starts}
|
||||
<Badge variant="secondary" class="shrink-0">
|
||||
{formatDateRange(event.starts, event.ends)}
|
||||
</Badge>
|
||||
{/if}
|
||||
</div>
|
||||
{#if event.location}
|
||||
<CardDescription class="flex items-center gap-1">
|
||||
<MapPin class="h-3 w-3" />
|
||||
{event.location}
|
||||
</CardDescription>
|
||||
{/if}
|
||||
</div>
|
||||
{#if event.location}
|
||||
<CardDescription class="flex items-center gap-1">
|
||||
<MapPin class="h-3 w-3" />
|
||||
{event.location}
|
||||
</CardDescription>
|
||||
{/if}
|
||||
</CardHeader>
|
||||
<CardContent class="flex items-center justify-between">
|
||||
<p class="text-sm text-muted-foreground">{eventRuns} Run{eventRuns === 1 ? '' : 's'}</p>
|
||||
<Button href="/dashboard/events/{event.id}" size="sm">Zum Event</Button>
|
||||
</CardContent>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p class="text-sm text-muted-foreground">{eventRuns} Run{eventRuns === 1 ? '' : 's'}</p>
|
||||
</CardContent>
|
||||
</a>
|
||||
</Card>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue