feat(demo): login trigger, feature gating + admin UI (HU/EN/DE)

Login page quietly probes /auth/demo (debounced) as a valid email is
typed/pasted and reloads into the app on a match — no visible button.
Demo sessions default to the whole library, get a one-time shared-account
warning, never see the YouTube-connect onboarding/access UI or sync
actions, and admins get a demo whitelist + reset panel in Settings.
This commit is contained in:
npeter83 2026-06-16 09:17:34 +02:00
parent 747c8d20ce
commit 281062fe33
11 changed files with 307 additions and 62 deletions

View file

@ -189,6 +189,17 @@ export default function App() {
message: t("common.accessRequestsMessage", { count: pending }),
});
}
// The demo account is shared: there are no subscriptions, so default it to the whole
// library (the "my" feed would be empty), and warn that its state is communal.
if (meQuery.data?.is_demo) {
setFilters({ ...loadStoredFilters(), scope: "all" });
notify({
level: "warning",
title: t("common.demoTitle"),
message: t("common.demoSharedNotice"),
requiresInteraction: true,
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [meQuery.data?.id]);