feat(web): command palette, toasts, and global shell chrome
- CommandPalette (Alt+K): fuzzy action launcher with keyboard nav. - Toasts: ephemeral notification stack + provider. - useGlobalHotkeys: Alt+K palette toggle, G-chord navigation (G D/F/M/L/B/A/S/U/E/C), respects editable-element focus. - Layout/App: wire ToastProvider at root, mount the palette inside the authed shell, introduce the global search box in the top bar. - MazeNETRoute now renders TopologyList inline when no ?topology is present, instead of bouncing through a redirect. - index.css: a few global token tweaks consumed by the new chrome. Fixes a latent breakage: Config.tsx and MazeNET already imported ./Toasts/useToast but the directory was never committed.
This commit is contained in:
19
decnet_web/src/components/Toasts/toast-context.ts
Normal file
19
decnet_web/src/components/Toasts/toast-context.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export type ToastTone = 'matrix' | 'violet' | 'alert';
|
||||
|
||||
export interface ToastInput {
|
||||
text: string;
|
||||
icon?: string;
|
||||
tone?: ToastTone;
|
||||
}
|
||||
|
||||
export interface Toast extends ToastInput {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface ToastContextValue {
|
||||
push: (t: ToastInput) => void;
|
||||
}
|
||||
|
||||
export const ToastContext = createContext<ToastContextValue | null>(null);
|
||||
Reference in New Issue
Block a user