mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 09:19:39 +02:00
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:
parent
90c438e267
commit
bf7517d24d
23 changed files with 842 additions and 19 deletions
|
|
@ -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} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue