mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
add clipboard monitor
This commit is contained in:
1 parent
79031b3b32
commit
29a4d14893
7 files changed
+409
-15
No files matched your search
@@ -28,3 +28,4 @@ serde_json = "1.0.149"
|
||||
serde = "1.0.228"
|
||||
zip = "8.1.0"
|
||||
tokio = { version = "1.50.0", features = ["io-util"] }
|
||||
tauri-plugin-clipboard-manager = "2"
|
||||
@@ -9,6 +9,7 @@
|
||||
"core:default",
|
||||
"opener:default",
|
||||
"http:default",
|
||||
"fs:default"
|
||||
"fs:default",
|
||||
"clipboard-manager:allow-read-text"
|
||||
]
|
||||
}
|
||||
@@ -12,6 +12,7 @@ pub fn run() {
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.setup(|app| {
|
||||
let app_dir = app.path().app_config_dir()?;
|
||||
create_dir_all(&app_dir)?;
|
||||
@@ -34,12 +35,6 @@ pub fn run() {
|
||||
execute_sql,
|
||||
download_url,
|
||||
])
|
||||
.build(tauri::generate_context!())
|
||||
.expect("error while running tauri application")
|
||||
.run(|_app_handle, event| match event {
|
||||
// On exit handler should be avoided for mobile
|
||||
// and rusqlite already closes gracefully by default
|
||||
tauri::RunEvent::ExitRequested { .. } => {}
|
||||
_ => {}
|
||||
});
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
Reference in new issue
Block a user