managarten/packages/shared-ui/src/quick-input/InputBarHelpModal.svelte
Till JS bf7517d24d 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>
2026-03-24 22:35:13 +01:00

27 lines
896 B
Svelte

<script lang="ts">
import { HelpModal } from '../help';
import { COMMON_SHORTCUTS, COMMON_SYNTAX, DEFAULT_LIVE_EXAMPLE } 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', appSyntax, liveExample }: Props = $props();
// Build the config for HelpModal: app-specific syntax first, then common
const config = $derived<HelpModalConfig>({
shortcuts: COMMON_SHORTCUTS,
syntax: [...(appSyntax || []), ...COMMON_SYNTAX],
defaultTab: mode,
liveExample: liveExample || DEFAULT_LIVE_EXAMPLE,
});
</script>
<HelpModal {open} {onClose} {config} />