Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/tauri/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function onNewConnection() {
}

async function onConnectSqliteFromDialog(payload: SqliteConnectPayload) {
// Close first — connect is async and must not leave the modal stuck open.
newConnectionOpen.value = false;
try {
await connections.connectSqlite(payload.path, { name: payload.name });
} catch {
Expand Down
33 changes: 33 additions & 0 deletions apps/tauri/src/styles/glass.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,36 @@
.q-glass--strong {
background: var(--q-glass-bg-strong);
}

/**
* Frosted modal scrim (Flutter `app_dialog` bokeh): constant blur sigma ≈ 8
* + dim tint. Tint only fades; blur stays fixed so enter/exit stay cheap (#1341).
*/
:root {
--q-modal-scrim-blur: 8px;
--q-modal-scrim-tint: color-mix(in srgb, #000 32%, transparent);
}

:root[data-platform="linux"],
:root[data-platform="windows"] {
--q-modal-scrim-blur: 6px;
}

:root[data-motion="off"],
:root[data-motion="reduced"] {
--q-modal-scrim-blur: 0px;
--q-modal-scrim-tint: color-mix(in srgb, #000 45%, transparent);
}

.q-modal-scrim {
background: var(--q-modal-scrim-tint);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
.q-modal-scrim {
-webkit-backdrop-filter: blur(var(--q-modal-scrim-blur))
saturate(var(--q-glass-saturate));
backdrop-filter: blur(var(--q-modal-scrim-blur))
saturate(var(--q-glass-saturate));
}
}
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/AboutDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="about-dialog"
@click.self="emit('close')"
>
Expand All @@ -59,7 +59,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey));
z-index: 2200;
display: grid;
place-items: center;
background: color-mix(in srgb, #000 45%, transparent);
padding: 24px;
}

Expand Down
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="command-palette"
@click.self="emit('close')"
>
Expand Down Expand Up @@ -105,7 +105,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
display: grid;
place-items: start center;
padding-top: 12vh;
background: color-mix(in srgb, #000 40%, transparent);
}

.palette {
Expand Down
6 changes: 3 additions & 3 deletions apps/tauri/src/ui/NewConnectionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ function submitSqlite() {
error.value = "Database file path is required.";
return;
}
emit("connectSqlite", { driver: "sqlite", name: n, path: p });
// Close before connect so the scrim never outlives a successful Save.
emit("close");
emit("connectSqlite", { driver: "sqlite", name: n, path: p });
}

function onKey(e: KeyboardEvent) {
Expand Down Expand Up @@ -236,7 +237,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="new-connection-dialog"
@click.self="emit('close')"
>
Expand Down Expand Up @@ -468,7 +469,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
display: grid;
place-items: center;
padding: 4vh 4vw;
background: color-mix(in srgb, #000 45%, transparent);
}

.dialog {
Expand Down
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/NewFolderDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function onKey(e: KeyboardEvent) {
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="new-folder-dialog"
@click.self="emit('close')"
@keydown="onKey"
Expand Down Expand Up @@ -80,7 +80,6 @@ function onKey(e: KeyboardEvent) {
z-index: 2100;
display: grid;
place-items: center;
background: color-mix(in srgb, #000 40%, transparent);
}

.dialog {
Expand Down
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/PreferencesDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="preferences-dialog"
@click.self="emit('close')"
>
Expand Down Expand Up @@ -743,7 +743,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
display: grid;
place-items: center;
padding: 4vh 5vw;
background: color-mix(in srgb, #000 45%, transparent);
}

.dialog {
Expand Down
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/QuickSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="quick-switcher"
@click.self="emit('close')"
>
Expand Down Expand Up @@ -143,7 +143,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true));
display: grid;
place-items: start center;
padding-top: 12vh;
background: color-mix(in srgb, #000 40%, transparent);
}

.panel {
Expand Down
3 changes: 1 addition & 2 deletions apps/tauri/src/ui/WelcomeTourDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ onUnmounted(() => window.removeEventListener("keydown", onKey));
<template>
<div
v-if="open"
class="overlay"
class="overlay q-modal-scrim"
data-testid="welcome-tour"
@click.self="emit('close')"
>
Expand Down Expand Up @@ -133,7 +133,6 @@ onUnmounted(() => window.removeEventListener("keydown", onKey));
z-index: 2200;
display: grid;
place-items: center;
background: color-mix(in srgb, #000 45%, transparent);
padding: 24px;
}

Expand Down
Loading