feat: 支持窗口状态记忆

This commit is contained in:
lanyeeee
2026-08-09 04:15:29 +08:00
parent d1ef3a87be
commit ace6b8efa0
6 changed files with 24 additions and 3 deletions
+16
View File
@@ -315,6 +315,7 @@ dependencies = [
"tauri-plugin-dialog",
"tauri-plugin-opener",
"tauri-plugin-os",
"tauri-plugin-window-state",
"tauri-specta",
"tokio",
"tracing",
@@ -4463,6 +4464,21 @@ dependencies = [
"thiserror 2.0.12",
]
[[package]]
name = "tauri-plugin-window-state"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d5f6fe3291bfa609c7e0b0ee3bedac294d94c7018934086ce782c1d0f2a468e"
dependencies = [
"bitflags 2.9.1",
"log",
"serde",
"serde_json",
"tauri",
"tauri-plugin",
"thiserror 2.0.12",
]
[[package]]
name = "tauri-runtime"
version = "2.7.0"
+1
View File
@@ -22,6 +22,7 @@ tauri = { version = "2", features = [] }
tauri-plugin-opener = "2"
tauri-plugin-os = "2"
tauri-plugin-dialog = "2"
tauri-plugin-window-state = "2"
dlopen2 = { version = "0.8.2" }
bilibili-video-downloader-plugin-api = { path = "../src-plugin/plugin-api" }
+1
View File
@@ -106,6 +106,7 @@ pub fn run() {
}
tauri::Builder::default()
.plugin(tauri_plugin_window_state::Builder::default().build())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_opener::init())
+2 -1
View File
@@ -8,9 +8,10 @@
"height": 600,
"minWidth": 800,
"minHeight": 600,
"visible": false,
"decorations": false,
"theme": "Light"
}
]
}
}
}
+2 -1
View File
@@ -8,10 +8,11 @@
"height": 600,
"minWidth": 800,
"minHeight": 600,
"visible": false,
"hiddenTitle": true,
"titleBarStyle": "Overlay",
"theme": "Light"
}
]
}
}
}
+2 -1
View File
@@ -8,10 +8,11 @@
"height": 600,
"minWidth": 800,
"minHeight": 600,
"visible": false,
"decorations": false,
"shadow": true,
"theme": "Light"
}
]
}
}
}