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(connection): make driver manager link clickable in install hint

t8y2abd3450814aa
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 9a0db76560..1b2f8ea829 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -47,6 +47,20 @@ pub fn run() {
}
}
+ if let Some(window) = app.get_webview_window("main") {
+ if let Ok(Some(monitor)) = window.current_monitor() {
+ let monitor_size = monitor.size();
+ if let Ok(window_size) = window.outer_size() {
+ if window_size.width > monitor_size.width || window_size.height > monitor_size.height {
+ let scale = monitor.scale_factor();
+ let _ = window
+ .set_size(tauri::PhysicalSize::new((1280.0 * scale) as u32, (800.0 * scale) as u32));
+ let _ = window.center();
+ }
+ }
+ }
+ }
+
Ok(())
})
.on_window_event(|window, event| {
diff --git a/src/App.vue b/src/App.vue
index eb402a2aff..238bbc8d87 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -751,6 +751,10 @@ onUnmounted(() => {
@connect-failed="
(msg: string) => toast(t('connection.connectFailed', { message: translateBackendError(t, msg) }), 5000)
"
+ @open-driver-store="
+ showConnectionDialog = false;
+ showDriverStore = true;
+ "
@structure-editor-saved="onStructureEditorSaved(onReloadData, toast)"
@open-lineage-target="openLineageTarget"
@open-database-search-target="openDatabaseSearchTarget"
diff --git a/src/components/connection/ConnectionDialog.vue b/src/components/connection/ConnectionDialog.vue
index 511b3cd6a7..52111148ba 100644
--- a/src/components/connection/ConnectionDialog.vue
+++ b/src/components/connection/ConnectionDialog.vue
@@ -40,6 +40,7 @@ const emit = defineEmits<{
connectStarted: [name: string];
connectSucceeded: [name: string];
connectFailed: [message: string];
+ openDriverStore: [];
}>();
const store = useConnectionStore();
@@ -1155,7 +1156,11 @@ function openExternalUrl(url: string) {
<div v-if="shouldShowAgentDriverInstallHint" class="grid grid-cols-4 items-center gap-4">
<span />
<p class="col-span-3 text-xs text-muted-foreground">
- 需要在顶部导航栏「驱动管理」中安装对应的驱动才能连接。
+ 需要在顶部导航栏「<a
+ class="underline cursor-pointer text-primary hover:text-primary/80"
+ @click="emit('openDriverStore')"
+ >驱动管理</a
+ >」中安装对应的驱动才能连接。
</p>
</div>
diff --git a/src/components/layout/AppDialogs.vue b/src/components/layout/AppDialogs.vue
index 7d0e92b85c..f90137a19c 100644
--- a/src/components/layout/AppDialogs.vue
+++ b/src/components/layout/AppDialogs.vue
@@ -39,6 +39,7 @@ const emit = defineEmits<{
connectStarted: [name: string];
connectSucceeded: [name: string];
connectFailed: [message: string];
+ openDriverStore: [];
structureEditorSaved: [];
openLineageTarget: [
target: {
@@ -100,6 +101,7 @@ watch(
@connect-started="emit('connectStarted', $event)"
@connect-succeeded="emit('connectSucceeded', $event)"
@connect-failed="emit('connectFailed', $event)"
+ @open-driver-store="emit('openDriverStore')"
/>
<EditorSettingsDialog
:open="showSettingsDialog"