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。

fix(app): avoid reconnecting restored tabs

t8y254620e1f2239
diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue
index 50cc155b55..9f07c81a82 100644
--- a/apps/desktop/src/App.vue
+++ b/apps/desktop/src/App.vue
@@ -992,7 +992,7 @@ function initApp() {
})
.then(() => {
console.log(`[STARTUP] connectionStore.initFromDisk: ${(performance.now() - t0).toFixed(0)}ms`);
- reconnectRestoredTabs();
+ restoreActiveConnectionContext();
})
.catch((e: any) => {
toast(t("connection.loadFailed", { message: e?.message || String(e) }), 5000);
@@ -1000,13 +1000,10 @@ function initApp() {
settingsStore.initAiConfig();
}
-async function reconnectRestoredTabs() {
+function restoreActiveConnectionContext() {
const activeConnectionId = activeTab.value?.connectionId || connectionStore.activeConnectionId;
if (activeConnectionId && connectionStore.getConfig(activeConnectionId)) {
connectionStore.activeConnectionId = activeConnectionId;
- try {
- await connectionStore.ensureConnected(activeConnectionId);
- } catch {}
}
}