feat(web/library): game library page — grid + custom-entry CRUD
Consumes the new library API (47f87a4) via the orval-generated hooks. A poster grid
over GET /api/v1/library (all stores merged), plus create/edit/delete for custom
entries — the admin-UI half of "create custom entries via the web console".
- GameCard: portrait (600×900) art with an onError fallback chain portrait → header
→ text placeholder (many Steam titles lack a 600×900 capsule). A store badge marks
Steam vs Custom; only custom cards expose edit/delete.
- Inline add/edit form (title + portrait/hero/header URLs + optional launch command,
mapped to LaunchSpec{kind:"command"}) wired to useCreateCustomGame /
useUpdateCustomGame / useDeleteCustomGame; the CRUD id strips the `custom:` prefix;
every mutation invalidates the library query. QueryState handles load/empty/error.
- Nav entry (LibraryBig) + en/de i18n strings.
`bun run lint` (tsc) and `bun run build` both green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { Link } from '@tanstack/react-router'
|
||||
import { Activity, Server, Users, KeyRound, Settings, Radio } from 'lucide-react'
|
||||
import { Activity, Server, Users, KeyRound, LibraryBig, Settings, Radio } from 'lucide-react'
|
||||
import { m } from '@/paraglide/messages'
|
||||
import { useLocale, changeLocale, locales, type Locale } from '@/lib/i18n'
|
||||
import { cn } from '@/lib/utils'
|
||||
@@ -8,6 +8,7 @@ import { cn } from '@/lib/utils'
|
||||
const NAV = [
|
||||
{ to: '/', icon: Activity, label: () => m.nav_dashboard() },
|
||||
{ to: '/host', icon: Server, label: () => m.nav_host() },
|
||||
{ to: '/library', icon: LibraryBig, label: () => m.nav_library() },
|
||||
{ to: '/clients', icon: Users, label: () => m.nav_clients() },
|
||||
{ to: '/pairing', icon: KeyRound, label: () => m.nav_pairing() },
|
||||
{ to: '/settings', icon: Settings, label: () => m.nav_settings() },
|
||||
|
||||
Reference in New Issue
Block a user