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:
@@ -1,12 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
type Env = 'prod' | 'staging' | 'dev'
|
||||
|
||||
withDefaults(
|
||||
defineProps<{ env?: Env; oncall?: boolean }>(),
|
||||
{ env: 'prod', oncall: true },
|
||||
)
|
||||
withDefaults(defineProps<{ oncall?: boolean }>(), { oncall: true })
|
||||
|
||||
const { user } = useOidcAuth()
|
||||
const { state: tweaks } = useTweaks()
|
||||
const { open: openPalette } = useCommandPalette()
|
||||
|
||||
const ENVS = {
|
||||
prod: { label: 'PROD', fg: 'var(--text)', bg: 'rgba(244,243,238,0.08)', border: 'rgba(244,243,238,0.15)' },
|
||||
@@ -14,11 +11,7 @@ const ENVS = {
|
||||
dev: { label: 'DEV', fg: '#D4AAFF', bg: 'rgba(159,98,212,0.18)', border: 'rgba(159,98,212,0.36)' },
|
||||
} as const
|
||||
|
||||
function openPalette() {
|
||||
// ⌘K palette lands in O.8 — this is the trigger surface.
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[palette] open requested')
|
||||
}
|
||||
const env = computed(() => tweaks.value.env)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user