From 24aeb508b46830390d25cf525329d7c144878908 Mon Sep 17 00:00:00 2001 From: ZhuchkaTriplesix Date: Sun, 15 Nov 2026 10:42:05 +0300 Subject: [PATCH] feat(ui): Preferences Flutter master-detail parity (#1941) Match Flutter chrome (760 dialog, header filter, 184px rail, field/switch rows, footer) and persist Appearance/SQL/MCP prefs with uiScale via CSS zoom. --- apps/tauri/src/App.vue | 2 + .../tauri/src/preferences/shortcutsCatalog.ts | 113 ++ apps/tauri/src/stores/preferences.ts | 29 +- apps/tauri/src/styles/base.css | 6 + apps/tauri/src/ui/PreferencesDialog.vue | 1429 +++++++++++------ 5 files changed, 1094 insertions(+), 485 deletions(-) create mode 100644 apps/tauri/src/preferences/shortcutsCatalog.ts diff --git a/apps/tauri/src/App.vue b/apps/tauri/src/App.vue index abfb57ea..507ae65c 100644 --- a/apps/tauri/src/App.vue +++ b/apps/tauri/src/App.vue @@ -7,6 +7,7 @@ import { useShellStore } from "./stores/shell"; import { useShellStatusStore } from "./stores/shellStatus"; import { useConnectionsStore } from "./stores/connections"; import { useShellNavStore } from "./stores/shellNav"; +import { usePreferencesStore } from "./stores/preferences"; import { initTheme } from "./theme/queryaTheme"; import { provideQueryaMotion } from "./motion"; import { buildCoreCommands, type AppCommand } from "./commands/registry"; @@ -27,6 +28,7 @@ const shell = useShellStore(); const status = useShellStatusStore(); const connections = useConnectionsStore(); const nav = useShellNavStore(); +usePreferencesStore(); // hydrate prefs + --q-ui-scale on boot const { surface } = storeToRefs(nav); const prefsOpen = ref(false); diff --git a/apps/tauri/src/preferences/shortcutsCatalog.ts b/apps/tauri/src/preferences/shortcutsCatalog.ts new file mode 100644 index 00000000..ac193902 --- /dev/null +++ b/apps/tauri/src/preferences/shortcutsCatalog.ts @@ -0,0 +1,113 @@ +export type ShortcutCategory = "SQL Editor" | "Data Grid" | "Navigation & App"; + +export type ShortcutItem = { + category: ShortcutCategory; + action: string; + keys: string[]; + altKeys?: string[][]; + description?: string; +}; + +const isMac = + typeof navigator !== "undefined" && + /Mac|iPhone|iPad/.test(navigator.platform); + +export const modKey = isMac ? "⌘" : "Ctrl"; + +/** Flutter Preferences shortcuts reference (read-only catalog). */ +export const allShortcuts: ShortcutItem[] = [ + { + category: "SQL Editor", + action: "Execute query / selection", + keys: [modKey, "Enter"], + altKeys: [[modKey, "R"]], + description: "Runs statement under cursor or selected text", + }, + { + category: "SQL Editor", + action: "Execute all statements", + keys: [modKey, "Shift", "Enter"], + altKeys: [["F5"]], + description: "Runs the script one statement at a time", + }, + { + category: "SQL Editor", + action: "New query tab", + keys: [modKey, "T"], + description: "Opens a new independent SQL tab session", + }, + { + category: "SQL Editor", + action: "Close current tab", + keys: [modKey, "W"], + }, + { + category: "SQL Editor", + action: "Query history", + keys: [modKey, "H"], + }, + { + category: "SQL Editor", + action: "Format SQL statement", + keys: ["Shift", "Alt", "F"], + }, + { + category: "Data Grid", + action: "Copy cell value", + keys: [modKey, "C"], + }, + { + category: "Data Grid", + action: "Set cell to NULL", + keys: ["Delete"], + altKeys: [["Backspace"]], + }, + { + category: "Data Grid", + action: "Toggle edit mode", + keys: [modKey, "E"], + }, + { + category: "Data Grid", + action: "Refresh results", + keys: ["F5"], + }, + { + category: "Navigation & App", + action: "Toggle sidebar", + keys: [modKey, "B"], + }, + { + category: "Navigation & App", + action: "Command palette", + keys: [modKey, "P"], + }, + { + category: "Navigation & App", + action: "Go to object", + keys: [modKey, "K"], + }, + { + category: "Navigation & App", + action: "Preferences", + keys: [modKey, ","], + }, + { + category: "Navigation & App", + action: "New connection", + keys: [modKey, "N"], + }, + { + category: "Navigation & App", + action: "Find in preferences", + keys: [modKey, "F"], + description: "Focuses the Preferences filter field", + }, +]; + +export const shortcutCategories = [ + "All", + "SQL Editor", + "Data Grid", + "Navigation & App", +] as const satisfies ReadonlyArray<"All" | ShortcutCategory>; diff --git a/apps/tauri/src/stores/preferences.ts b/apps/tauri/src/stores/preferences.ts index c85ed610..feb13d8b 100644 --- a/apps/tauri/src/stores/preferences.ts +++ b/apps/tauri/src/stores/preferences.ts @@ -8,13 +8,15 @@ export type PrefsState = { updateChannel: "stable" | "dev"; confirmDestructive: boolean; editorFontSize: number; + /** null = no limit */ pgTimeoutSec: number | null; mysqlTimeoutSec: number | null; sqliteTimeoutSec: number | null; historyMax: number; maxResultRows: number; mcpEnabled: boolean; - extensionsSideload: boolean; + uiScale: number; + animateThemeChanges: boolean; }; const defaults: PrefsState = { @@ -28,20 +30,29 @@ const defaults: PrefsState = { historyMax: 200, maxResultRows: 5000, mcpEnabled: false, - extensionsSideload: true, + uiScale: 100, + animateThemeChanges: true, }; function load(): PrefsState { try { const raw = localStorage.getItem(STORAGE_KEY); if (!raw) return { ...defaults }; - return { ...defaults, ...JSON.parse(raw) }; + const parsed = JSON.parse(raw) as Partial; + return { ...defaults, ...parsed }; } catch { return { ...defaults }; } } -/** App preferences — Flutter PreferencesDialog shape, localStorage for now. */ +function applyUiScale(percent: number) { + document.documentElement.style.setProperty( + "--q-ui-scale", + String(percent / 100), + ); +} + +/** Flutter PreferencesDialog shape — localStorage until app settings land. */ export const usePreferencesStore = defineStore("preferences", () => { const state = reactive(load()); @@ -49,13 +60,19 @@ export const usePreferencesStore = defineStore("preferences", () => { state, () => { localStorage.setItem(STORAGE_KEY, JSON.stringify(state)); + applyUiScale(state.uiScale); }, - { deep: true }, + { deep: true, immediate: true }, ); + function resetAppearance() { + state.uiScale = defaults.uiScale; + state.animateThemeChanges = defaults.animateThemeChanges; + } + function reset() { Object.assign(state, defaults); } - return { state, reset }; + return { state, reset, resetAppearance }; }); diff --git a/apps/tauri/src/styles/base.css b/apps/tauri/src/styles/base.css index bfd3e275..bbc15c0b 100644 --- a/apps/tauri/src/styles/base.css +++ b/apps/tauri/src/styles/base.css @@ -8,6 +8,11 @@ box-sizing: border-box; } +html { + /* Preferences → Appearance → Interface scale (Flutter ui_scale). */ + --q-ui-scale: 1; +} + html, body, #app { @@ -27,4 +32,5 @@ body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + zoom: var(--q-ui-scale); } diff --git a/apps/tauri/src/ui/PreferencesDialog.vue b/apps/tauri/src/ui/PreferencesDialog.vue index 6c487efb..4cd54746 100644 --- a/apps/tauri/src/ui/PreferencesDialog.vue +++ b/apps/tauri/src/ui/PreferencesDialog.vue @@ -6,13 +6,18 @@ import { type QueryaThemeMode, } from "../theme/queryaTheme"; import { useQueryaMotion } from "../motion"; -import { usePreferencesStore } from "../stores/preferences"; import type { QueryaMotionLevel } from "../motion/types"; +import { usePreferencesStore } from "../stores/preferences"; +import { + allShortcuts, + shortcutCategories, + type ShortcutItem, +} from "../preferences/shortcutsCatalog"; const props = defineProps<{ open: boolean }>(); const emit = defineEmits<{ close: [] }>(); -type Category = +type CategoryId = | "general" | "appearance" | "sql" @@ -22,89 +27,203 @@ type Category = | "shortcuts" | "about"; -const categories: { - id: Category; +type Category = { + id: CategoryId; label: string; description: string; -}[] = [ + /** Display glyph (Flutter rail icon stand-in). */ + icon: string; + keywords: string; +}; + +type TimeoutKey = "pgTimeoutSec" | "mysqlTimeoutSec" | "sqliteTimeoutSec"; + +const categories: Category[] = [ { id: "general", label: "General", description: "Startup, updates, release channel", + icon: "⚙", + keywords: "updates startup automatic release channel stable beta", }, { id: "appearance", label: "Appearance", description: "Themes, dark mode, scaling, animations", + icon: "◇", + keywords: "theme dark light system scaling motion animation interface color", }, { id: "sql", label: "SQL & Editor", description: "Editor font, statement timeouts, query history", + icon: "›_", + keywords: + "font size postgresql mysql sqlite statement timeout history destructive drop truncate delete", }, { id: "dataGrid", label: "Data Grid", description: "Result rows limit, column sizing, safety", + icon: "▦", + keywords: "max rows results grid column size formatting safety limits", }, { id: "extensions", label: "Extensions", description: "Sideloading .qext/.zip packages, extension folder", + icon: "⧉", + keywords: "extensions qext zip package install sideload folder directory", }, { id: "mcp", label: "MCP Server", description: "Let AI clients read shared connections", + icon: "◉", + keywords: "mcp ai model claude cursor vscode copilot llm server share token", }, { id: "shortcuts", label: "Shortcuts", description: "Keyboard shortcuts reference and keymap", + icon: "⌘", + keywords: "shortcut keyboard keymap hotkey", }, { id: "about", label: "About & Storage", - description: "App version, local storage, paths", + description: "App version, local SQLite storage, paths", + icon: "ℹ", + keywords: "about version storage directory cache logs sqlite", }, ]; -const category = ref("general"); +const TIMEOUT_OPTS = [ + { value: "", label: "No limit" }, + { value: "10", label: "10 s" }, + { value: "30", label: "30 s" }, + { value: "60", label: "60 s" }, + { value: "120", label: "2 min" }, + { value: "300", label: "5 min" }, + { value: "600", label: "10 min" }, +]; + +const HISTORY_OPTS = [25, 50, 100, 200, 500]; +const ROWS_OPTS = [1000, 2500, 5000, 10000, 25000, 50000, 100000]; +const SCALE_OPTS = [75, 85, 90, 100, 110, 125, 150, 175, 200]; + +const category = ref("general"); const search = ref(""); +const searchEl = ref(null); +const shortcutChip = ref<(typeof shortcutCategories)[number]>("All"); const themeMode = ref(readStoredTheme()); const prefs = usePreferencesStore(); const motion = useQueryaMotion(); +const extMsg = ref(null); + +const searchQuery = computed(() => search.value.trim().toLowerCase()); +const hasSearch = computed(() => searchQuery.value.length > 0); + +function shortcutMatches(s: ShortcutItem, q: string): boolean { + return [s.action, s.description ?? "", s.category, s.keys.join(" ")] + .join(" ") + .toLowerCase() + .includes(q); +} -const filteredCategories = computed(() => { - const q = search.value.trim().toLowerCase(); - if (!q) return categories; - return categories.filter( - (c) => - c.label.toLowerCase().includes(q) || - c.description.toLowerCase().includes(q) || - c.id.toLowerCase().includes(q), - ); +function matchCountFor(cat: Category, q: string): number { + if (!q) return 0; + let n = 0; + if (cat.label.toLowerCase().includes(q)) n++; + if (cat.description.toLowerCase().includes(q)) n++; + // Flutter: keyword bag via String.contains on the whole bag. + if (cat.keywords.includes(q)) n++; + if (cat.id === "shortcuts") { + n += allShortcuts.filter((s) => shortcutMatches(s, q)).length; + } + return n; +} + +const matchCounts = computed(() => { + const q = searchQuery.value; + const counts = {} as Record; + for (const cat of categories) { + counts[cat.id] = matchCountFor(cat, q); + } + return counts; }); -const activeMeta = computed( - () => categories.find((c) => c.id === category.value) ?? categories[0], -); +const shortcutChipCounts = computed(() => { + const counts: Record = { All: allShortcuts.length }; + for (const s of allShortcuts) { + counts[s.category] = (counts[s.category] ?? 0) + 1; + } + return counts; +}); -const shortcuts = [ - { keys: "Ctrl/Cmd + N", action: "New connection" }, - { keys: "Ctrl/Cmd + B", action: "Toggle sidebar" }, - { keys: "Ctrl/Cmd + ,", action: "Preferences" }, - { keys: "Ctrl/Cmd + Enter", action: "Run SQL (SQL tab)" }, - { keys: "Esc", action: "Close dialog / menu" }, -]; +const filteredShortcuts = computed(() => { + const q = searchQuery.value; + const chip = shortcutChip.value; + return allShortcuts.filter((s) => { + if (chip !== "All" && s.category !== chip) return false; + return !q || shortcutMatches(s, q); + }); +}); + +const shortcutGroups = computed(() => { + const map = new Map(); + for (const s of filteredShortcuts.value) { + const list = map.get(s.category) ?? []; + list.push(s); + map.set(s.category, list); + } + return [...map.entries()]; +}); + +function timeoutModel(key: TimeoutKey) { + return computed({ + get: () => { + const v = prefs.state[key]; + return v == null ? "" : String(v); + }, + set: (v: string) => { + prefs.state[key] = v === "" ? null : Number(v); + }, + }); +} -function setTheme(mode: QueryaThemeMode) { +const pgTimeout = timeoutModel("pgTimeoutSec"); +const mysqlTimeout = timeoutModel("mysqlTimeoutSec"); +const sqliteTimeout = timeoutModel("sqliteTimeoutSec"); + +function onThemeChange(e: Event) { + const mode = (e.target as HTMLSelectElement).value as QueryaThemeMode; themeMode.value = mode; applyTheme(mode); } -function setMotion(level: QueryaMotionLevel) { - motion.setLevel(level); +function onMotionChange(e: Event) { + motion.setLevel((e.target as HTMLSelectElement).value as QueryaMotionLevel); +} + +function onSearchInput() { + if (!hasSearch.value) return; + if (matchCounts.value[category.value] > 0) return; + const first = categories.find((c) => matchCounts.value[c.id] > 0); + if (first) category.value = first.id; +} + +function clearSearch() { + search.value = ""; + searchEl.value?.focus(); +} + +function onInstallExtStub() { + extMsg.value = "Extension install dialog lands with the marketplace epic."; +} + +function onOpenExtFolderStub() { + extMsg.value = "Open extensions folder — path plumbing next."; } function onKey(e: KeyboardEvent) { @@ -112,28 +231,28 @@ function onKey(e: KeyboardEvent) { if (e.key === "Escape") { e.preventDefault(); emit("close"); + return; + } + if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "f") { + e.preventDefault(); + searchEl.value?.focus(); } } watch( () => props.open, - (v) => { - if (v) { - category.value = "general"; - search.value = ""; - themeMode.value = readStoredTheme(); - } + (open) => { + if (!open) return; + category.value = "general"; + search.value = ""; + shortcutChip.value = "All"; + themeMode.value = readStoredTheme(); + extMsg.value = null; }, ); -watch(filteredCategories, (list) => { - if (!list.some((c) => c.id === category.value) && list[0]) { - category.value = list[0].id; - } -}); - -onMounted(() => window.addEventListener("keydown", onKey)); -onUnmounted(() => window.removeEventListener("keydown", onKey)); +onMounted(() => window.addEventListener("keydown", onKey, true)); +onUnmounted(() => window.removeEventListener("keydown", onKey, true)); @@ -450,139 +750,189 @@ onUnmounted(() => window.removeEventListener("keydown", onKey)); z-index: 2000; display: grid; place-items: center; + padding: 4vh 5vw; background: color-mix(in srgb, #000 45%, transparent); - padding: 20px; } .dialog { - width: min(860px, 100%); - height: min(560px, 100%); - display: grid; - grid-template-columns: 220px 1fr; - border-radius: 12px; + width: min(760px, 100%); + min-width: min(480px, 100%); + height: min(760px, 100%); + max-height: min(760px, 92vh); + display: flex; + flex-direction: column; + border-radius: 14px; overflow: hidden; border: 1px solid var(--q-border); background: var(--q-surface); + color: var(--q-foreground); + box-shadow: 0 16px 48px color-mix(in srgb, #000 35%, transparent); } -.nav { - padding: 12px 8px; - background: var(--q-sidebar-bg); - border-right: 1px solid - color-mix(in srgb, var(--q-border) 70%, transparent); +.header { display: flex; - flex-direction: column; - gap: 2px; - overflow: auto; + align-items: center; + gap: 10px; + padding: 16px 16px 12px 20px; + border-bottom: 1px solid + color-mix(in srgb, var(--q-border) 28%, transparent); + flex: 0 0 auto; } -.nav-title { - margin: 0 8px 8px; - font-size: 11px; - font-weight: 700; - letter-spacing: 0.06em; - text-transform: uppercase; +.hdr-icon { + color: var(--q-primary); + font-size: 16px; + line-height: 1; +} + +.hdr-title { + margin: 0; + font-size: 16px; + font-weight: 650; + flex: 0 0 auto; +} + +.search-wrap { + flex: 1; + min-width: 0; + height: 32px; + display: flex; + align-items: center; + gap: 8px; + padding: 0 10px; + margin-left: 20px; + border-radius: 6px; + background: color-mix(in srgb, var(--q-muted-foreground) 12%, transparent); + border: 1px solid color-mix(in srgb, var(--q-border) 25%, transparent); +} + +.search-wrap.active { + border-color: color-mix(in srgb, var(--q-primary) 50%, transparent); +} + +.search-ico { color: var(--q-muted-foreground); + font-size: 13px; +} + +.search-wrap.active .search-ico { + color: var(--q-primary); } .search { - margin: 0 6px 8px; - height: 28px; - border: 1px solid var(--q-border); - border-radius: var(--q-radius-control); - background: var(--q-surface); + flex: 1; + min-width: 0; + border: 0; + background: transparent; color: var(--q-foreground); - padding: 0 8px; font: inherit; font-size: 12px; + outline: none; } -.nav-item { +.search-clear, +.hdr-close { appearance: none; border: 0; background: transparent; - text-align: left; - padding: 8px 10px; - border-radius: var(--q-radius-control); - font: inherit; + width: 28px; + height: 28px; + border-radius: 6px; + color: var(--q-muted-foreground); cursor: pointer; - display: flex; - flex-direction: column; - gap: 2px; -} - -.nav-item.active, -.nav-item:hover { - background: color-mix(in srgb, var(--q-primary) 14%, transparent); + flex: 0 0 auto; } -.nav-label { - font-size: 12px; - font-weight: 600; +.search-clear:hover, +.hdr-close:hover { + background: var(--q-accent); color: var(--q-foreground); } -.nav-item.active .nav-label { - color: var(--q-primary); -} - -.nav-desc { - font-size: 10px; - color: var(--q-muted-foreground); - line-height: 1.3; +.body { + flex: 1; + min-height: 0; + display: grid; + grid-template-columns: 184px 1fr; } -.pane { +.rail { + overflow: auto; + padding: 10px 8px; + border-right: 1px solid + color-mix(in srgb, var(--q-border) 28%, transparent); display: flex; flex-direction: column; - min-width: 0; + gap: 2px; } -.pane-head { +.rail-tile { + appearance: none; + border: 0; + background: transparent; display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 12px; - padding: 14px 16px; - border-bottom: 1px solid - color-mix(in srgb, var(--q-border) 70%, transparent); + align-items: center; + gap: 10px; + padding: 8px 10px; + border-radius: 6px; + font: inherit; + cursor: pointer; + color: var(--q-foreground); + text-align: left; } -.pane-head h2 { - margin: 0; - font-size: 15px; - font-weight: 650; +.rail-tile:hover { + background: var(--q-accent); } -.pane-sub { - margin: 4px 0 0; - font-size: 11px; - color: var(--q-muted-foreground); +.rail-tile.on { + background: color-mix(in srgb, var(--q-primary) 12%, transparent); + color: var(--q-primary); } -.x { - appearance: none; - border: 0; - background: transparent; - width: 28px; - height: 28px; - border-radius: var(--q-radius-sm); - color: var(--q-muted-foreground); - cursor: pointer; +.rail-ico { + width: 16px; + text-align: center; + font-size: 12px; + opacity: 0.9; flex: 0 0 auto; } -.x:hover { - background: var(--q-accent); +.rail-label { + flex: 1; + font-size: 12px; + font-weight: 400; +} + +.rail-tile.on .rail-label { + font-weight: 600; +} + +.badge { + font-size: 10px; + font-weight: 600; + line-height: 1; + padding: 3px 5px; + border-radius: 10px; + background: color-mix(in srgb, var(--q-muted-foreground) 50%, transparent); color: var(--q-foreground); } -.body { - padding: 16px 18px 20px; +.badge.on { + background: var(--q-primary); + color: var(--q-primary-foreground); +} + +.pane { overflow: auto; + padding: 16px 24px; +} + +.section { + max-width: 100%; } -.body h3 { +.sec-title { margin: 0 0 6px; font-size: 13px; font-weight: 650; @@ -591,157 +941,278 @@ onUnmounted(() => window.removeEventListener("keydown", onKey)); .hint { margin: 0 0 14px; font-size: 12px; - color: var(--q-muted-foreground); - line-height: 1.4; -} - -.muted { - margin: 12px 0 0; - font-size: 12px; - color: var(--q-muted-foreground); -} - -.switch-row, -.field, -.block { - display: flex; - flex-direction: column; - gap: 6px; - padding: 10px 0; - border-bottom: 1px solid - color-mix(in srgb, var(--q-border) 35%, transparent); + line-height: 1.35; + color: color-mix(in srgb, var(--q-foreground) 72%, transparent); } .switch-row { - flex-direction: row; + display: flex; align-items: center; justify-content: space-between; gap: 16px; + padding: 6px 0; + border-radius: 6px; + cursor: pointer; + margin-bottom: 4px; +} + +.switch-copy { + min-width: 0; } .t { + display: block; font-size: 12px; font-weight: 500; - color: var(--q-foreground); } .s { display: block; + margin-top: 2px; font-size: 11px; color: var(--q-muted-foreground); line-height: 1.35; - margin-top: 2px; } -select, -input[type="number"] { - height: 30px; - max-width: 220px; +.switch { + width: 36px; + height: 20px; + flex: 0 0 auto; + accent-color: var(--q-primary); +} + +.field-row { + display: flex; + gap: 12px; + align-items: flex-start; + margin: 12px 0 16px; +} + +.field-label { + width: 152px; + flex: 0 0 152px; + font-size: 12px; + padding-top: 7px; +} + +.field-control { + flex: 1; + min-width: 0; +} + +.field-control select { + width: 100%; + height: 32px; border: 1px solid var(--q-border); - border-radius: var(--q-radius-control); + border-radius: 6px; background: var(--q-sidebar-bg); color: var(--q-foreground); - padding: 0 8px; + padding: 0 10px; font: inherit; font-size: 12px; } -.seg { - display: inline-flex; - gap: 4px; - padding: 3px; - border-radius: var(--q-radius-control); - background: var(--q-sidebar-bg); - width: fit-content; +.field-hint { + margin: 4px 0 0; + font-size: 11px; + line-height: 1.35; + color: var(--q-muted-foreground); } -.seg button { - appearance: none; - border: 0; - background: transparent; - padding: 6px 12px; - border-radius: var(--q-radius-sm); - font: inherit; +.card { + margin: 12px 0; + padding: 14px; + border-radius: 8px; + border: 1px solid color-mix(in srgb, var(--q-border) 70%, transparent); + background: color-mix(in srgb, var(--q-muted-foreground) 6%, transparent); +} + +.card-title { + margin: 0 0 4px; font-size: 12px; + font-weight: 650; +} + +.card-body { + margin: 0 0 10px; + font-size: 11px; color: var(--q-muted-foreground); - cursor: pointer; + line-height: 1.4; } -.seg button.on { +.btn-row { + display: flex; + flex-wrap: wrap; + gap: 8px; +} + +.btn { + appearance: none; + height: 30px; + padding: 0 12px; + border-radius: 6px; + border: 1px solid var(--q-border); background: var(--q-surface); color: var(--q-foreground); - font-weight: 600; + font: inherit; + font-size: 12px; + cursor: pointer; + text-decoration: none; + display: inline-flex; + align-items: center; } -.linkish { +.btn:hover:not(:disabled) { + background: var(--q-accent); +} + +.btn:disabled { + opacity: 0.45; + cursor: default; +} + +.btn.link { + color: var(--q-primary); +} + +.msg { + margin: 10px 0 0; + font-size: 12px; + color: var(--q-muted-foreground); +} + +.chips { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 14px; +} + +.chip { appearance: none; - border: 0; + border: 1px solid var(--q-border); background: transparent; - padding: 0; - width: fit-content; + color: var(--q-muted-foreground); + border-radius: 999px; + padding: 4px 10px; font: inherit; font-size: 11px; - color: var(--q-primary); cursor: pointer; - text-align: left; } -.keys { - width: 100%; - border-collapse: collapse; - font-size: 12px; +.chip.on { + background: color-mix(in srgb, var(--q-primary) 16%, transparent); + border-color: transparent; + color: var(--q-primary); + font-weight: 600; } -.keys td { - padding: 8px 0; - border-bottom: 1px solid - color-mix(in srgb, var(--q-border) 35%, transparent); +.sc-group { + margin-bottom: 16px; } -.mono { - font-family: var(--q-font-mono); +.sc-head { + margin: 0 0 6px; font-size: 11px; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; color: var(--q-muted-foreground); } -.dl { +.sc-list { + list-style: none; margin: 0; + padding: 0; + border: 1px solid color-mix(in srgb, var(--q-border) 70%, transparent); + border-radius: 8px; + overflow: hidden; +} + +.sc-row { display: flex; - flex-direction: column; - gap: 10px; + justify-content: space-between; + gap: 16px; + align-items: center; + padding: 10px 12px; + border-bottom: 1px solid + color-mix(in srgb, var(--q-border) 40%, transparent); } -.dl div { - display: grid; - grid-template-columns: 7rem 1fr; - gap: 8px; - font-size: 12px; +.sc-row:last-child { + border-bottom: 0; +} + +.sc-keys { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 4px; + justify-content: flex-end; +} + +.combo { + display: inline-flex; + align-items: center; + gap: 3px; } -.dl dt { +.or { + margin: 0 4px; + font-size: 10px; color: var(--q-muted-foreground); - font-weight: 500; } -.dl dd { - margin: 0; +kbd { + font-family: var(--q-font-mono); + font-size: 11px; + font-weight: 600; + padding: 2px 6px; + border-radius: 4px; + border: 1px solid color-mix(in srgb, var(--q-border) 80%, transparent); + background: var(--q-sidebar-bg); } -.danger { - appearance: none; - margin-top: 16px; - height: 30px; - padding: 0 12px; - border: 1px solid color-mix(in srgb, var(--q-destructive) 50%, transparent); - border-radius: var(--q-radius-control); - background: transparent; - color: var(--q-destructive); - font: inherit; - font-size: 12px; - cursor: pointer; +.about-card { + display: flex; + gap: 14px; + align-items: center; +} + +.about-mark { + width: 48px; + height: 48px; + border-radius: 999px; + background: var(--q-primary); + box-shadow: 0 0 0 3px color-mix(in srgb, var(--q-primary) 22%, transparent); + flex: 0 0 auto; +} + +.about-name { + margin: 0 0 4px; + font-size: 15px; + font-weight: 650; +} + +.footer { + flex: 0 0 auto; + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + padding: 12px 16px 14px 20px; + border-top: 1px solid + color-mix(in srgb, var(--q-border) 28%, transparent); +} + +.foot-hint { + margin: 0; + flex: 1; } -.danger:hover { - background: color-mix(in srgb, var(--q-destructive) 12%, transparent); +.close-btn { + height: 34px; + min-width: 88px; + justify-content: center; }