feat(operator): command palette, impersonation, incident, tweaks (O.8)
- CommandPalette + useCommandPalette: ⌘K opens a search-and-jump panel over real tenants/partners + fixture flags + nav + actions. Arrow keys + Enter navigate, Escape/backdrop close. Recents are intentionally omitted for now; add when there's something to recent over. - Impersonation stub: useImpersonation + ImpersonationModal + ImpersonationBanner. Modal opens from tenant detail and from the palette. Banner stays at the top of the shell until exited. No real OBO token is minted — wiring OAuth Token Exchange is tracked as a follow-up. - IncidentModal + useIncidentModal: opened from the Overview and Infrastructure incident banners, renders the mock INCIDENT data with metrics, timeline and draft composer. - TweaksPanel + useTweaks: floating bottom-right panel for theme (dark/light), density (comfy/compact), env badge (prod/staging/dev). Saved to localStorage. - Theme/density apply via [data-theme] + [data-density] overrides in tokens.css. Topbar env badge now reads from useTweaks instead of a prop. - Layout wires ⌘K + ⌘[ at the document level and mounts the palette + modals + banner + tweaks panel once for all pages.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// Shared open/close state for the ⌘K command palette. The trigger lives on
|
||||
// the topbar and on the global keyboard shortcut handler, while the rendered
|
||||
// panel lives in the default layout — they all read/write the same ref via
|
||||
// this composable.
|
||||
|
||||
const isOpen = ref(false)
|
||||
|
||||
export const useCommandPalette = () => ({
|
||||
isOpen,
|
||||
open: () => {
|
||||
isOpen.value = true
|
||||
},
|
||||
close: () => {
|
||||
isOpen.value = false
|
||||
},
|
||||
toggle: () => {
|
||||
isOpen.value = !isOpen.value
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user