Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(editor): keep in-page search input background solid on focus when wallpaper is active (#11511) (#11583)

lxk955567a285d7ef3
diff --git a/apps/desktop/src/components/common/TextContentSearchBar.vue b/apps/desktop/src/components/common/TextContentSearchBar.vue
index 55166114bb..101a3804b5 100644
--- a/apps/desktop/src/components/common/TextContentSearchBar.vue
+++ b/apps/desktop/src/components/common/TextContentSearchBar.vue
@@ -167,7 +167,12 @@ defineExpose({ focusInput, inputEl: inputRef });
<button v-if="allowReplace" type="button" class="flex h-7 w-5 shrink-0 items-center justify-center rounded hover:bg-accent" :title="t('editor.search.replace')" :aria-label="t('editor.search.replace')" :aria-expanded="showReplace" @pointerdown.stop @click="showReplace = !showReplace">
<ChevronDown class="h-4 w-4" :class="{ '-rotate-90': !showReplace }" />
</button>
- <div class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:border-ring focus-within:ring-1 focus-within:ring-ring" :class="{ 'border-destructive focus-within:border-destructive focus-within:ring-destructive': error }" data-no-drag @pointerdown.stop>
+ <div
+ class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:bg-background-solid focus-within:border-ring focus-within:ring-1 focus-within:ring-ring"
+ :class="{ 'border-destructive focus-within:border-destructive focus-within:ring-destructive': error }"
+ data-no-drag
+ @pointerdown.stop
+ >
<input
ref="inputRef"
data-text-content-search-input
diff --git a/apps/desktop/src/components/editor/EditorGotoLinePanel.vue b/apps/desktop/src/components/editor/EditorGotoLinePanel.vue
index 9ea8276a1e..866f0c7cb5 100644
--- a/apps/desktop/src/components/editor/EditorGotoLinePanel.vue
+++ b/apps/desktop/src/components/editor/EditorGotoLinePanel.vue
@@ -94,7 +94,7 @@ defineExpose({
<span class="flex h-7 w-7 shrink-0 items-center justify-center text-muted-foreground" :title="t('editor.gotoLine.placeholder')" aria-hidden="true">
<ArrowRightToLine class="h-4 w-4" />
</span>
- <div class="flex h-8 w-40 items-center rounded-md border border-input bg-background focus-within:border-ring focus-within:ring-1 focus-within:ring-ring" :class="gotoLineError && 'border-destructive focus-within:border-destructive'">
+ <div class="flex h-8 w-40 items-center rounded-md border border-input bg-background focus-within:bg-background-solid focus-within:border-ring focus-within:ring-1 focus-within:ring-ring" :class="gotoLineError && 'border-destructive focus-within:border-destructive'">
<input
ref="gotoLineInputRef"
v-model="gotoLineInput"
diff --git a/apps/desktop/src/components/editor/EditorSearchPanel.vue b/apps/desktop/src/components/editor/EditorSearchPanel.vue
index b71b6d0834..21b6913ab5 100644
--- a/apps/desktop/src/components/editor/EditorSearchPanel.vue
+++ b/apps/desktop/src/components/editor/EditorSearchPanel.vue
@@ -518,7 +518,7 @@ defineExpose({
<button class="flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground" :title="showReplace ? t('editor.search.collapseReplace') : t('editor.search.expandReplace')" @click="showReplace = !showReplace">
<ChevronRight class="h-4 w-4 transition-transform" :class="showReplace && 'rotate-90'" />
</button>
- <div class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:border-ring focus-within:ring-1 focus-within:ring-ring">
+ <div class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:bg-background-solid focus-within:border-ring focus-within:ring-1 focus-within:ring-ring">
<input
ref="searchInputRef"
v-model="searchText"
@@ -582,7 +582,7 @@ defineExpose({
</div>
<div v-if="showReplace" class="flex items-center gap-1">
<div class="h-7 w-7 shrink-0" />
- <div class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:border-ring focus-within:ring-1 focus-within:ring-ring">
+ <div class="flex h-8 w-64 items-center rounded-md border border-input bg-background focus-within:bg-background-solid focus-within:border-ring focus-within:ring-1 focus-within:ring-ring">
<input
ref="replaceInputRef"
v-model="replaceText"
@@ -663,6 +663,10 @@ defineExpose({
box-shadow: 0 1px 0 color-mix(in srgb, var(--foreground) 3%, transparent) inset;
}
+.editor-search-panel--editor :deep(.border-input:focus-within) {
+ background: var(--background-solid, var(--background));
+}
+
.editor-search-panel--editor :deep(.focus-within\:border-ring:focus-within) {
border-color: var(--ring);
box-shadow: 0 0 0 1px var(--ring);
diff --git a/apps/desktop/src/components/grid/DataGridSearchBar.vue b/apps/desktop/src/components/grid/DataGridSearchBar.vue
index beb0111eeb..2065eca848 100644
--- a/apps/desktop/src/components/grid/DataGridSearchBar.vue
+++ b/apps/desktop/src/components/grid/DataGridSearchBar.vue
@@ -62,7 +62,7 @@ defineExpose({
<template>
<Transition enter-active-class="transition-opacity duration-150" leave-active-class="transition-opacity duration-100" enter-from-class="opacity-0" leave-to-class="opacity-0">
- <div v-if="props.open" data-grid-search-bar class="absolute top-1 right-2 z-20 max-w-[calc(100%-1rem)] px-2 py-1 bg-background border rounded-md shadow-md" @keydown.esc.stop.prevent="emit('close')">
+ <div v-if="props.open" data-grid-search-bar class="absolute top-1 right-2 z-20 max-w-[calc(100%-1rem)] px-2 py-1 bg-background focus-within:bg-background-solid border rounded-md shadow-md" @keydown.esc.stop.prevent="emit('close')">
<div class="flex items-center gap-1 min-w-0">
<button
v-if="props.replaceAvailable !== undefined"
@@ -164,12 +164,12 @@ defineExpose({
<button data-grid-replace-all type="button" class="h-6 border rounded px-2 text-xs disabled:opacity-40" :disabled="!props.replaceAvailable || props.replaceBusy || !props.replaceMatchCount" @click="emit('replaceAll')">{{ t("editor.search.replaceAll") }}</button>
</div>
<div v-if="replaceOpen" class="flex flex-wrap items-center gap-1 mt-1 text-xs">
- <select v-model="replaceScope" data-grid-replace-scope class="min-w-0 h-6 max-w-full rounded border bg-background px-1" :aria-label="t('grid.replaceScope')">
+ <select v-model="replaceScope" data-grid-replace-scope class="min-w-0 h-6 max-w-full rounded border bg-background focus:bg-background-solid px-1" :aria-label="t('grid.replaceScope')">
<option value="loaded">{{ t("grid.replaceLoadedResults") }}</option>
<option value="column">{{ t("grid.replaceCurrentColumn") }}</option>
<option value="selection">{{ t("grid.replaceSelectedCells") }}</option>
</select>
- <select v-if="replaceScope === 'column'" v-model.number="replaceColumn" data-grid-replace-column class="h-6 min-w-0 flex-1 max-w-48 rounded border bg-background px-1" :aria-label="t('grid.replaceCurrentColumn')">
+ <select v-if="replaceScope === 'column'" v-model.number="replaceColumn" data-grid-replace-column class="h-6 min-w-0 flex-1 max-w-48 rounded border bg-background focus:bg-background-solid px-1" :aria-label="t('grid.replaceCurrentColumn')">
<option :value="-1" disabled>{{ t("grid.replaceChooseColumn") }}</option>
<option v-for="(column, index) in props.columns" :key="index" :value="index">{{ column }}</option>
</select>