fix(desktop): improve legacy WebView style compatibility
This commit is contained in:
30 files changed
+1802
-459
No files matched your search
@@ -3901,12 +3901,16 @@ onUnmounted(() => {
|
||||
{{ t("settings.sqlFormatterEditorShortcuts") }}
|
||||
</div>
|
||||
<div class="overflow-hidden rounded-md border border-border/70 bg-background">
|
||||
<div v-for="definition in formatterEditorShortcutDefinitions" :key="definition.id" class="group -mt-px grid gap-2 border-t border-border/70 px-3 py-2 transition-colors first:mt-0 first:border-t-0 hover:bg-muted/40 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center">
|
||||
<div class="min-w-0">
|
||||
<div
|
||||
v-for="definition in formatterEditorShortcutDefinitions"
|
||||
:key="definition.id"
|
||||
class="settings-shortcut-row group -mt-px grid gap-2 border-t border-border/70 px-3 py-2 transition-colors first:mt-0 first:border-t-0 hover:bg-muted/40 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center"
|
||||
>
|
||||
<div class="settings-shortcut-label min-w-0">
|
||||
<Label class="min-w-0 truncate leading-none">{{ t(definition.labelKey) }}</Label>
|
||||
</div>
|
||||
<div class="min-w-0 space-y-1">
|
||||
<div class="flex items-center justify-end gap-1.5">
|
||||
<div class="settings-shortcut-actions min-w-0 space-y-1 text-right">
|
||||
<div class="settings-shortcut-controls flex items-center justify-end gap-1.5">
|
||||
<input
|
||||
:data-shortcut-input="definition.id"
|
||||
:value="editingShortcutId === definition.id ? '' : formatShortcutPill(editShortcuts[definition.id])"
|
||||
@@ -3925,7 +3929,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.shortcutPressShortcut')"
|
||||
@click="focusShortcutInput(definition.id)"
|
||||
>
|
||||
@@ -3939,7 +3943,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.reset')"
|
||||
@click="resetShortcut(definition.id)"
|
||||
>
|
||||
@@ -3950,7 +3954,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.shortcutClear')"
|
||||
@click="clearShortcut(definition.id)"
|
||||
>
|
||||
@@ -4924,7 +4928,7 @@ onUnmounted(() => {
|
||||
<div class="space-y-2">
|
||||
<Label>{{ t("settings.exportBatchSize") }}</Label>
|
||||
<div class="flex items-center gap-3">
|
||||
<Input type="number" list="export-batch-sizes" min="100" max="100000" step="100" v-model.number="editExportBatchSize" class="h-9 w-28 [&::-webkit-inner-spin-button]:appearance-none" />
|
||||
<Input type="number" list="export-batch-sizes" min="100" max="100000" step="100" v-model.number="editExportBatchSize" class="settings-export-number-input h-9 w-28 [&::-webkit-inner-spin-button]:appearance-none" />
|
||||
<datalist id="export-batch-sizes">
|
||||
<option value="500" />
|
||||
<option value="1000" />
|
||||
@@ -4947,7 +4951,7 @@ onUnmounted(() => {
|
||||
<div class="space-y-2">
|
||||
<Label for="export-row-limit">{{ t("settings.exportRowLimit") }}</Label>
|
||||
<div class="flex items-center gap-3">
|
||||
<Input id="export-row-limit" type="number" min="100" max="2147483647" step="100" v-model.number="editExportRowLimit" :disabled="!editExportRowLimitEnabled" class="h-9 w-32 [&::-webkit-inner-spin-button]:appearance-none" />
|
||||
<Input id="export-row-limit" type="number" min="100" max="2147483647" step="100" v-model.number="editExportRowLimit" :disabled="!editExportRowLimitEnabled" class="settings-export-number-input h-9 w-32 [&::-webkit-inner-spin-button]:appearance-none" />
|
||||
<span class="text-xs text-muted-foreground">
|
||||
{{ editExportRowLimitEnabled ? t("settings.exportRowLimitDescription") : t("settings.exportRowLimitUnlimited") }}
|
||||
</span>
|
||||
@@ -5082,8 +5086,8 @@ onUnmounted(() => {
|
||||
<div v-if="filteredShortcutDefinitions.length === 0" class="px-3 py-8 text-center text-sm text-muted-foreground">
|
||||
{{ t("settings.shortcutSearchNoResults") }}
|
||||
</div>
|
||||
<div v-for="definition in filteredShortcutDefinitions" :key="definition.id" class="group -mt-px grid gap-2 border-t border-border/70 px-3 py-2 transition-colors first:mt-0 first:border-t-0 hover:bg-muted/40 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center">
|
||||
<div class="min-w-0">
|
||||
<div v-for="definition in filteredShortcutDefinitions" :key="definition.id" class="settings-shortcut-row group -mt-px grid gap-2 border-t border-border/70 px-3 py-2 transition-colors first:mt-0 first:border-t-0 hover:bg-muted/40 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center">
|
||||
<div class="settings-shortcut-label min-w-0">
|
||||
<div class="flex min-w-0 items-center gap-2">
|
||||
<Label class="min-w-0 truncate leading-none">{{ t(definition.labelKey) }}</Label>
|
||||
<Badge variant="outline" class="h-5 shrink-0 rounded-md border-border/60 px-1.5 text-[11px] font-normal text-muted-foreground">
|
||||
@@ -5091,8 +5095,8 @@ onUnmounted(() => {
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
<div class="min-w-0 space-y-1">
|
||||
<div class="flex items-center justify-end gap-1.5">
|
||||
<div class="settings-shortcut-actions min-w-0 space-y-1 text-right">
|
||||
<div class="settings-shortcut-controls flex items-center justify-end gap-1.5">
|
||||
<input
|
||||
:data-shortcut-input="definition.id"
|
||||
:value="editingShortcutId === definition.id ? '' : formatShortcutPill(editShortcuts[definition.id])"
|
||||
@@ -5111,7 +5115,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.shortcutPressShortcut')"
|
||||
@click="focusShortcutInput(definition.id)"
|
||||
>
|
||||
@@ -5125,7 +5129,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.reset')"
|
||||
@click="resetShortcut(definition.id)"
|
||||
>
|
||||
@@ -5136,7 +5140,7 @@ onUnmounted(() => {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100"
|
||||
class="settings-shortcut-action-button h-7 w-7 shrink-0 text-muted-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100"
|
||||
:aria-label="t('settings.shortcutClear')"
|
||||
@click="clearShortcut(definition.id)"
|
||||
>
|
||||
@@ -5743,7 +5747,7 @@ onUnmounted(() => {
|
||||
<!-- Config Edit View -->
|
||||
<div v-else class="space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<Button type="button" variant="ghost" size="sm" @click="aiEnterListMode()">
|
||||
<Button type="button" variant="ghost" size="sm" class="settings-ai-back-button" @click="aiEnterListMode()">
|
||||
<ArrowLeft class="mr-1 h-3.5 w-3.5" />
|
||||
{{ t("common.back") }}
|
||||
</Button>
|
||||
@@ -6338,19 +6342,21 @@ onUnmounted(() => {
|
||||
|
||||
<section v-else-if="activeSettingsTab === 'about'" data-settings-search-id="about" :class="['flex flex-col gap-5 py-2', settingsSearchTargetClass('about')]">
|
||||
<div class="rounded-lg border p-4">
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div class="settings-about-section-header flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div class="min-w-0 space-y-1">
|
||||
<Label>{{ t("settings.supportInfoTitle") }}</Label>
|
||||
<p class="text-sm text-muted-foreground">
|
||||
{{ t("settings.supportInfoDescription") }}
|
||||
</p>
|
||||
</div>
|
||||
<Button type="button" variant="outline" size="sm" class="shrink-0" :disabled="appSupportInfoLoading && !appSupportInfo" @click="copyAppSupportInfo">
|
||||
<Loader2 v-if="appSupportInfoLoading && !appSupportInfo" class="mr-1 h-3.5 w-3.5 animate-spin" />
|
||||
<CheckCircle2 v-else-if="appSupportInfoCopied" class="mr-1 h-3.5 w-3.5" />
|
||||
<Copy v-else class="mr-1 h-3.5 w-3.5" />
|
||||
{{ appSupportInfoCopied ? t("settings.supportInfoCopied") : t("settings.supportInfoCopy") }}
|
||||
</Button>
|
||||
<div class="settings-about-section-actions flex shrink-0 flex-wrap items-center gap-2">
|
||||
<Button type="button" variant="outline" size="sm" class="shrink-0" :disabled="appSupportInfoLoading && !appSupportInfo" @click="copyAppSupportInfo">
|
||||
<Loader2 v-if="appSupportInfoLoading && !appSupportInfo" class="mr-1 h-3.5 w-3.5 animate-spin" />
|
||||
<CheckCircle2 v-else-if="appSupportInfoCopied" class="mr-1 h-3.5 w-3.5" />
|
||||
<Copy v-else class="mr-1 h-3.5 w-3.5" />
|
||||
{{ appSupportInfoCopied ? t("settings.supportInfoCopied") : t("settings.supportInfoCopy") }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="appSupportInfoRows.length" class="mt-4 grid gap-3 sm:grid-cols-2">
|
||||
<div v-for="row in appSupportInfoRows" :key="row.key" class="min-w-0 rounded-md bg-muted/30 px-3 py-2">
|
||||
@@ -6690,6 +6696,103 @@ onUnmounted(() => {
|
||||
margin-top: 0.625rem;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-shortcut-row:hover .settings-shortcut-action-button,
|
||||
html.dbx-legacy-webview .settings-shortcut-row:focus-within .settings-shortcut-action-button {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout [data-slot="select-trigger"][data-size="default"]:not(.h-7) {
|
||||
height: 2rem !important;
|
||||
min-height: 2rem !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout [data-slot="select-trigger"].h-9 {
|
||||
height: 2rem !important;
|
||||
min-height: 2rem !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout [data-slot="select-trigger"][data-size="sm"],
|
||||
html.dbx-legacy-webview .settings-layout [data-slot="select-trigger"].h-7 {
|
||||
height: 1.75rem !important;
|
||||
min-height: 1.75rem !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-shortcut-row {
|
||||
grid-template-columns: minmax(0, 1fr) auto !important;
|
||||
align-items: center !important;
|
||||
column-gap: 0.75rem !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-shortcut-label {
|
||||
align-self: center !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-shortcut-actions {
|
||||
justify-self: end !important;
|
||||
align-self: center !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-shortcut-controls {
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
align-items: center !important;
|
||||
justify-content: flex-end !important;
|
||||
gap: 0.375rem !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-export-number-input {
|
||||
height: 2rem !important;
|
||||
min-height: 2rem !important;
|
||||
padding-top: 0.25rem !important;
|
||||
padding-bottom: 0.25rem !important;
|
||||
line-height: 1.25rem !important;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-layout .settings-export-number-input::-webkit-inner-spin-button,
|
||||
html.dbx-legacy-webview .settings-layout .settings-export-number-input::-webkit-outer-spin-button {
|
||||
-webkit-appearance: inner-spin-button !important;
|
||||
appearance: auto !important;
|
||||
min-height: 1.5rem !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-ai-back-button {
|
||||
margin-left: -0.625rem !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-about-section-header {
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
align-items: flex-start !important;
|
||||
justify-content: space-between !important;
|
||||
gap: 0.75rem !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-about-section-actions {
|
||||
display: flex !important;
|
||||
flex-wrap: wrap !important;
|
||||
align-items: center !important;
|
||||
justify-content: flex-end !important;
|
||||
margin-left: auto !important;
|
||||
gap: 0.5rem !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
html.dbx-legacy-webview .settings-about-section-header {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .settings-about-section-actions {
|
||||
justify-content: flex-start !important;
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.settings-appearance-top-grid,
|
||||
.settings-appearance-theme-grid,
|
||||
|
||||
Reference in new issue
Block a user