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: add select-filtered button for visible databases search

t8y2cded066fdfc5
diff --git a/apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue b/apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue
index 988c400bb7..491bf7f421 100644
--- a/apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue
+++ b/apps/desktop/src/components/sidebar/VisibleDatabasesDialog.vue
@@ -101,10 +101,16 @@ function toggleDatabase(database: string) {
selectedNames.value = next;
}
+const isSearching = computed(() => searchText.value.trim().length > 0);
+
function selectAll() {
selectedNames.value = new Set(listedDatabaseNames.value);
}
+function selectFiltered() {
+ selectedNames.value = new Set(filteredDatabaseNames.value);
+}
+
function clearSelection() {
selectedNames.value = new Set();
}
@@ -142,6 +148,9 @@ async function saveSelection() {
<button class="hover:text-foreground disabled:opacity-50" :disabled="isLoading" @click="selectAll">
{{ t("visibleDatabases.selectAll") }}
</button>
+ <button v-if="isSearching" class="hover:text-foreground disabled:opacity-50" :disabled="isLoading" @click="selectFiltered">
+ {{ t("visibleDatabases.selectFiltered") }}
+ </button>
<button class="hover:text-foreground disabled:opacity-50" :disabled="isLoading" @click="clearSelection">
{{ t("visibleDatabases.clear") }}
</button>
diff --git a/apps/desktop/src/i18n/locales/en.ts b/apps/desktop/src/i18n/locales/en.ts
index 369540db88..6264ce38b1 100644
--- a/apps/desktop/src/i18n/locales/en.ts
+++ b/apps/desktop/src/i18n/locales/en.ts
@@ -1161,6 +1161,7 @@
searchPlaceholder: "Search databases...",
selectedCount: "{selected}/{total} selected",
selectAll: "Select all",
+ selectFiltered: "Select search results",
clear: "Clear",
showAll: "Show all",
showSystemDatabases: "Show system databases",
diff --git a/apps/desktop/src/i18n/locales/zh-CN.ts b/apps/desktop/src/i18n/locales/zh-CN.ts
index 7efc32e35b..88825050a5 100644
--- a/apps/desktop/src/i18n/locales/zh-CN.ts
+++ b/apps/desktop/src/i18n/locales/zh-CN.ts
@@ -1160,6 +1160,7 @@
searchPlaceholder: "搜索数据库...",
selectedCount: "已选择 {selected}/{total}",
selectAll: "全选",
+ selectFiltered: "选中搜索结果",
clear: "清空",
showAll: "显示全部",
showSystemDatabases: "显示系统库",