chore: dashboard

This commit is contained in:
lencx
2022-12-13 19:10:42 +08:00
parent 430d6e4af2
commit 8363ff234d
18 changed files with 169 additions and 141 deletions

View File

@@ -36,10 +36,15 @@ fn main() {
.on_window_event(|event| {
// https://github.com/tauri-apps/tauri/discussions/2684
if let tauri::WindowEvent::CloseRequested { api, .. } = event.event() {
// TODO: https://github.com/tauri-apps/tauri/issues/3084
// event.window().hide().unwrap();
// https://github.com/tauri-apps/tao/pull/517
event.window().minimize().unwrap();
let win = event.window();
if win.label() == "main" {
win.hide().unwrap();
} else {
// TODO: https://github.com/tauri-apps/tauri/issues/3084
// event.window().hide().unwrap();
// https://github.com/tauri-apps/tao/pull/517
event.window().minimize().unwrap();
}
api.prevent_close();
}
})