mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
removed default shortcuts
This commit is contained in:
parent
ace7ea48bc
commit
09f6a2c40f
3 changed files with 23 additions and 2 deletions
11
src-tauri/Cargo.lock
generated
11
src-tauri/Cargo.lock
generated
|
@ -3558,6 +3558,7 @@ dependencies = [
|
||||||
"tauri-plugin-clipboard-manager",
|
"tauri-plugin-clipboard-manager",
|
||||||
"tauri-plugin-dialog",
|
"tauri-plugin-dialog",
|
||||||
"tauri-plugin-os",
|
"tauri-plugin-os",
|
||||||
|
"tauri-plugin-prevent-default",
|
||||||
"tauri-plugin-sql",
|
"tauri-plugin-sql",
|
||||||
"tauri-plugin-updater",
|
"tauri-plugin-updater",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
@ -5156,6 +5157,16 @@ dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tauri-plugin-prevent-default"
|
||||||
|
version = "0.1.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "38be0ac8fcc5fa03422409fc506015b01dc29cc8a3a72572c68d41e6f10f4491"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.6.0",
|
||||||
|
"tauri",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-sql"
|
name = "tauri-plugin-sql"
|
||||||
version = "2.0.0-beta.8"
|
version = "2.0.0-beta.8"
|
||||||
|
|
|
@ -17,6 +17,7 @@ tauri-plugin-autostart = "2.0.0-beta.8"
|
||||||
tauri-plugin-os = "2.0.0-beta.7"
|
tauri-plugin-os = "2.0.0-beta.7"
|
||||||
tauri-plugin-updater = "2.0.0-beta.10"
|
tauri-plugin-updater = "2.0.0-beta.10"
|
||||||
tauri-plugin-dialog = "2.0.0-beta.11"
|
tauri-plugin-dialog = "2.0.0-beta.11"
|
||||||
|
tauri-plugin-prevent-default = "0.1"
|
||||||
sqlx = { version = "0.7.4", features = ["runtime-tokio-native-tls", "sqlite"] }
|
sqlx = { version = "0.7.4", features = ["runtime-tokio-native-tls", "sqlite"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
|
|
|
@ -12,6 +12,7 @@ mod updater;
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
use tauri::PhysicalPosition;
|
use tauri::PhysicalPosition;
|
||||||
use tauri_plugin_autostart::MacosLauncher;
|
use tauri_plugin_autostart::MacosLauncher;
|
||||||
|
use tauri_plugin_prevent_default::Flags;
|
||||||
|
|
||||||
pub fn center_window_on_current_monitor(window: &tauri::WebviewWindow) {
|
pub fn center_window_on_current_monitor(window: &tauri::WebviewWindow) {
|
||||||
if let Some(monitor) = window.available_monitors().unwrap().iter().find(|m| {
|
if let Some(monitor) = window.available_monitors().unwrap().iter().find(|m| {
|
||||||
|
@ -53,6 +54,11 @@ fn main() {
|
||||||
MacosLauncher::LaunchAgent,
|
MacosLauncher::LaunchAgent,
|
||||||
Some(vec![]),
|
Some(vec![]),
|
||||||
))
|
))
|
||||||
|
.plugin(
|
||||||
|
tauri_plugin_prevent_default::Builder::new()
|
||||||
|
.with_flags(Flags::all().difference(Flags::CONTEXT_MENU))
|
||||||
|
.build(),
|
||||||
|
)
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
let app_handle = app.handle().clone();
|
let app_handle = app.handle().clone();
|
||||||
|
|
||||||
|
@ -73,7 +79,10 @@ fn main() {
|
||||||
window.close_devtools();
|
window.close_devtools();
|
||||||
}
|
}
|
||||||
|
|
||||||
let app_data_dir = app.path().app_data_dir().expect("Failed to get app data directory");
|
let app_data_dir = app
|
||||||
|
.path()
|
||||||
|
.app_data_dir()
|
||||||
|
.expect("Failed to get app data directory");
|
||||||
clipboard::set_app_data_dir(app_data_dir);
|
clipboard::set_app_data_dir(app_data_dir);
|
||||||
|
|
||||||
tauri::async_runtime::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
|
@ -98,4 +107,4 @@ fn main() {
|
||||||
])
|
])
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
.expect("error while running tauri application");
|
.expect("error while running tauri application");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue