feat(auth): add SessionExpiredBanner to all remaining web apps

Added to: clock, photos, storage, mukke, planta, picture, skilltree,
nutriphi, chat. Now all 13 web apps show a re-login banner when
token refresh permanently fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-24 22:35:13 +01:00
parent 90c438e267
commit bf7517d24d
23 changed files with 842 additions and 19 deletions

View file

@ -1,23 +1,27 @@
<script lang="ts">
import { HelpModal } from '../help';
import { COMMON_SHORTCUTS, COMMON_SYNTAX, DEFAULT_LIVE_EXAMPLE } from '../help';
import type { HelpModalConfig } from '../help';
import type { HelpModalConfig, SyntaxGroup } from '../help';
interface Props {
open: boolean;
onClose: () => void;
mode?: 'shortcuts' | 'syntax';
/** App-specific syntax patterns (shown before common patterns) */
appSyntax?: SyntaxGroup[];
/** Override the live example */
liveExample?: HelpModalConfig['liveExample'];
}
let { open, onClose, mode = 'shortcuts' }: Props = $props();
let { open, onClose, mode = 'shortcuts', appSyntax, liveExample }: Props = $props();
// Build the config for HelpModal using common defaults
const config: HelpModalConfig = {
// Build the config for HelpModal: app-specific syntax first, then common
const config = $derived<HelpModalConfig>({
shortcuts: COMMON_SHORTCUTS,
syntax: COMMON_SYNTAX,
syntax: [...(appSyntax || []), ...COMMON_SYNTAX],
defaultTab: mode,
liveExample: DEFAULT_LIVE_EXAMPLE,
};
liveExample: liveExample || DEFAULT_LIVE_EXAMPLE,
});
</script>
<HelpModal {open} {onClose} {config} />