Files
minstrel/web/src/routes/collection/+layout.ts
T
bvandeusenandClaude Opus 5.5 358849de77
release / govulncheck (push) Successful in 21s
release / web (push) Successful in 1m39s
release / go (push) Successful in 1m54s
release / integration (push) Successful in 5m33s
release / android (push) Successful in 5m40s
release / Build signed APK (releases and dev) (push) Successful in 5m56s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 25s
release / Verify release artifacts (tag releases only) (push) Skipped
feat: the Wanted view becomes Collection, shaped like Lidarr: an artist catalogue first, the state sections down a left rail (M502 #5577)
The section opens on a catalogue of every artist on the list, A–Z with a
letter rail, each card showing how many of their albums are held. An artist
opens on their page: every album of theirs, held or not, with its status,
search, releases and tracks. Wanted, Missing files, Activity, Following and
Blocked sit down a left rail as the sections that show state; Held is gone,
the catalogue shows it. The section moves from /wanted to /collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 21:14:33 -04:00

14 lines
468 B
TypeScript

import { redirect } from '@sveltejs/kit';
import { user } from '#lib/auth/store.svelte.js';
import type { LayoutLoad } from './$types';
// Hard route gate: the Wanted view is an admin's (M502). Runs before the
// layout renders; auth is bootstrapped by the root +layout.ts, so user.value is
// either a settled User object or null.
export const load: LayoutLoad = () => {
if (!user.value || !user.value.is_admin) {
throw redirect(302, '/');
}
return {};
};