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) {
- 需要在顶部导航栏「驱动管理」中安装对应的驱动才能连接。 + 需要在顶部导航栏「驱动管理」中安装对应的驱动才能连接。