mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
Merge pull request #1 from 0PandaDEV/gitbutler/integration
Gitbutler/integration
This commit is contained in:
commit
57f055ba70
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-dialog",
|
||||
"tauri-plugin-os",
|
||||
"tauri-plugin-prevent-default",
|
||||
"tauri-plugin-sql",
|
||||
"tauri-plugin-updater",
|
||||
"tokio",
|
||||
|
@ -5156,6 +5157,16 @@ dependencies = [
|
|||
"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]]
|
||||
name = "tauri-plugin-sql"
|
||||
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-updater = "2.0.0-beta.10"
|
||||
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"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tokio = { version = "1.0", features = ["full"] }
|
||||
|
|
|
@ -12,6 +12,7 @@ mod updater;
|
|||
use tauri::Manager;
|
||||
use tauri::PhysicalPosition;
|
||||
use tauri_plugin_autostart::MacosLauncher;
|
||||
use tauri_plugin_prevent_default::Flags;
|
||||
|
||||
pub fn center_window_on_current_monitor(window: &tauri::WebviewWindow) {
|
||||
if let Some(monitor) = window.available_monitors().unwrap().iter().find(|m| {
|
||||
|
@ -53,6 +54,11 @@ fn main() {
|
|||
MacosLauncher::LaunchAgent,
|
||||
Some(vec![]),
|
||||
))
|
||||
.plugin(
|
||||
tauri_plugin_prevent_default::Builder::new()
|
||||
.with_flags(Flags::all().difference(Flags::CONTEXT_MENU))
|
||||
.build(),
|
||||
)
|
||||
.setup(|app| {
|
||||
let app_handle = app.handle().clone();
|
||||
|
||||
|
@ -73,7 +79,10 @@ fn main() {
|
|||
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);
|
||||
|
||||
tauri::async_runtime::spawn(async move {
|
||||
|
@ -98,4 +107,4 @@ fn main() {
|
|||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue