From d53d64a732b71b0d018310609a6f3dce14b0f23f Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:14:29 +0100 Subject: [PATCH 1/6] chore: update project dependencies and lock files --- .gitignore | 1 + package.json | 4 +- src-tauri/Cargo.lock | 137 +++++++++++++++++++++++++++++++++++++++---- src-tauri/Cargo.toml | 8 +-- 4 files changed, 132 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index c000981..1e5c576 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ logs bun.lockb .gitignore .vscode +bun.lock \ No newline at end of file diff --git a/package.json b/package.json index af86563..73d8ae7 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ }, "dependencies": { "@tauri-apps/api": "2.2.0", - "@tauri-apps/cli": "2.2.5", + "@tauri-apps/cli": "2.2.7", "@tauri-apps/plugin-autostart": "2.2.0", "@tauri-apps/plugin-os": "2.2.0", - "nuxt": "3.15.2", + "nuxt": "3.15.4", "overlayscrollbars": "2.10.1", "overlayscrollbars-vue": "0.5.9", "sass-embedded": "1.83.4", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index f4215d8..5941134 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1241,6 +1241,15 @@ dependencies = [ "dirs-sys 0.4.1", ] +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys 0.5.0", +] + [[package]] name = "dirs-sys" version = "0.3.7" @@ -1248,7 +1257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.5", "winapi", ] @@ -1260,10 +1269,22 @@ checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.4.5", "windows-sys 0.48.0", ] +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.0", + "windows-sys 0.59.0", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -1910,6 +1931,18 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + [[package]] name = "gif" version = "0.13.1" @@ -3938,7 +3971,7 @@ version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -4058,7 +4091,7 @@ dependencies = [ "log", "meta_fetcher", "parking_lot", - "rand 0.8.5", + "rand 0.9.0", "rdev", "regex", "reqwest", @@ -4199,6 +4232,17 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.0", + "zerocopy 0.8.14", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -4219,6 +4263,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.0", +] + [[package]] name = "rand_core" version = "0.5.1" @@ -4237,6 +4291,16 @@ dependencies = [ "getrandom 0.2.15", ] +[[package]] +name = "rand_core" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff" +dependencies = [ + "getrandom 0.3.1", + "zerocopy 0.8.14", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -4376,6 +4440,17 @@ dependencies = [ "thiserror 1.0.63", ] +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 2.0.3", +] + [[package]] name = "regex" version = "1.11.1" @@ -4785,9 +4860,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa 1.0.11", "memchr", @@ -5496,13 +5571,13 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.2.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f6efc261c7905839b4914889a5b25df07f0ff89c63fb4afd6ff8c96af15e4d" +checksum = "58a998b6be84104ca05c7e9a21f2180ddec020c8b84ea59a8fc8530a2a19588d" dependencies = [ "anyhow", "bytes", - "dirs 5.0.1", + "dirs 6.0.0", "dunce", "embed_plist", "futures-util", @@ -5793,9 +5868,9 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2d39224390c41ba544f02b4f1721f42256320b3fb8c371e9425cbddeb4a68c" +checksum = "ad3de2b9203bb00b9765e637a9878aaace34df40ae484878b8cea7a5bd5f9188" dependencies = [ "base64 0.22.1", "dirs 5.0.1", @@ -6548,6 +6623,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -7233,6 +7317,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -7459,7 +7552,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468" +dependencies = [ + "zerocopy-derive 0.8.14", ] [[package]] @@ -7473,6 +7575,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "zerocopy-derive" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "zerofrom" version = "0.1.4" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3d71bff..4f2379d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -10,7 +10,7 @@ rust-version = "1.70" tauri-build = { version = "2.0.5", features = [] } [dependencies] -tauri = { version = "2.2.3", features = [ +tauri = { version = "2.2.5", features = [ "macos-private-api", "tray-icon", "image-png" @@ -18,7 +18,7 @@ tauri = { version = "2.2.3", features = [ tauri-plugin-sql = { version = "2.2.0", features = ["sqlite"] } tauri-plugin-autostart = "2.2.0" tauri-plugin-os = "2.2.0" -tauri-plugin-updater = "2.3.1" +tauri-plugin-updater = "2.4.0" tauri-plugin-dialog = "2.2.0" tauri-plugin-fs = "2.2.0" tauri-plugin-clipboard = "2.1.11" @@ -28,9 +28,9 @@ tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptaba sqlx = { version = "0.8.3", features = ["runtime-tokio-native-tls", "sqlite", "chrono"] } serde = { version = "1.0.217", features = ["derive"] } tokio = { version = "1.43.0", features = ["full"] } -serde_json = "1.0.137" +serde_json = "1.0.138" rdev = "0.5.3" -rand = "0.8.5" +rand = "0.9.0" base64 = "0.22.1" image = "0.25.5" reqwest = { version = "0.12.12", features = ["json", "blocking"] } From 6016fbb4943d1d6f02c2064879d8d8f959476738 Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:38:43 +0100 Subject: [PATCH 2/6] chore: update Cargo dependencies and modify Aptabase plugin configuration --- src-tauri/Cargo.lock | 51 ++++++++++++++++++++++---------------------- src-tauri/Cargo.toml | 11 +++++++--- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5941134..ebfbe74 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1660,9 +1660,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1675,9 +1675,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1685,15 +1685,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1713,9 +1713,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1732,9 +1732,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -1743,21 +1743,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -3631,9 +3631,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.2" +version = "3.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +checksum = "6e6520c8cc998c5741ee68ec1dc369fc47e5f0ea5320018ecf2a1ccd6328f48b" dependencies = [ "log", "serde", @@ -5462,9 +5462,9 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" dependencies = [ "libc", ] @@ -5695,9 +5695,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.1" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e6660a409963e4d57b9bfab4addd141eeff41bd3a7fb14e13004a832cf7ef6" +checksum = "5841b9a0200e954ef7457f8d327091424328891e267a97b641dc246cc54d0dec" dependencies = [ "anyhow", "glob", @@ -5713,12 +5713,11 @@ dependencies = [ [[package]] name = "tauri-plugin-aptabase" version = "0.5.1" -source = "git+https://github.com/aptabase/tauri-plugin-aptabase?branch=v2#373abe1954bf20152082e506d36be07727259bb5" dependencies = [ "futures", "log", "os_info", - "rand 0.8.5", + "rand 0.9.0", "reqwest", "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4f2379d..43259a1 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -13,7 +13,7 @@ tauri-build = { version = "2.0.5", features = [] } tauri = { version = "2.2.5", features = [ "macos-private-api", "tray-icon", - "image-png" + "image-png", ] } tauri-plugin-sql = { version = "2.2.0", features = ["sqlite"] } tauri-plugin-autostart = "2.2.0" @@ -24,8 +24,13 @@ tauri-plugin-fs = "2.2.0" tauri-plugin-clipboard = "2.1.11" tauri-plugin-prevent-default = "1.0.2" tauri-plugin-global-shortcut = "2.2.0" -tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "v2" } -sqlx = { version = "0.8.3", features = ["runtime-tokio-native-tls", "sqlite", "chrono"] } +# tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "v2" } +tauri-plugin-aptabase = { path = "C:\\Users\\pandadev\\Documents\\Developer\\Rust\\tauri-plugin-aptabase" } +sqlx = { version = "0.8.3", features = [ + "runtime-tokio-native-tls", + "sqlite", + "chrono", +] } serde = { version = "1.0.217", features = ["derive"] } tokio = { version = "1.43.0", features = ["full"] } serde_json = "1.0.138" From 66df55017f5fa255c773b391c86e718ec56e7910 Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:39:04 +0100 Subject: [PATCH 3/6] refactor: simplify random ID generation in history initialization --- src-tauri/src/db/history.rs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src-tauri/src/db/history.rs b/src-tauri/src/db/history.rs index 5ee32e6..3b0a4b2 100644 --- a/src-tauri/src/db/history.rs +++ b/src-tauri/src/db/history.rs @@ -1,23 +1,26 @@ use crate::utils::types::{ ContentType, HistoryItem }; use base64::{ engine::general_purpose::STANDARD, Engine }; -use rand::distributions::Alphanumeric; -use rand::{ thread_rng, Rng }; +use rand::{ rng, Rng }; +use rand::distr::Alphanumeric; use sqlx::{ Row, SqlitePool }; use std::fs; use tauri_plugin_aptabase::EventTracker; pub async fn initialize_history(pool: &SqlitePool) -> Result<(), Box> { - let id: String = thread_rng().sample_iter(&Alphanumeric).take(16).map(char::from).collect(); + let id: String = rng() + .sample_iter(&Alphanumeric) + .take(16) + .map(char::from) + .collect(); - sqlx - ::query( - "INSERT INTO history (id, source, content_type, content, timestamp) VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP)" - ) - .bind(id) - .bind("System") - .bind("text") - .bind("Welcome to your clipboard history!") - .execute(pool).await?; + sqlx::query( + "INSERT INTO history (id, source, content_type, content, timestamp) VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP)" + ) + .bind(id) + .bind("System") + .bind("text") + .bind("Welcome to your clipboard history!") + .execute(pool).await?; Ok(()) } From 2d3732b2f2557d6d3b4d5896596957299b04c95c Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:39:10 +0100 Subject: [PATCH 4/6] fix: improve thread safety in hotkey management --- src-tauri/src/api/hotkeys.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/api/hotkeys.rs b/src-tauri/src/api/hotkeys.rs index 87cb11a..6152ea0 100644 --- a/src-tauri/src/api/hotkeys.rs +++ b/src-tauri/src/api/hotkeys.rs @@ -18,9 +18,10 @@ struct HotkeyState { registered_hotkey: Option, } +unsafe impl Send for HotkeyState {} + pub fn setup(app_handle: tauri::AppHandle) { let state = Arc::new(Mutex::new(HotkeyState::default())); - let manager = match GlobalHotKeyManager::new() { Ok(manager) => manager, Err(err) => { @@ -43,7 +44,7 @@ pub fn setup(app_handle: tauri::AppHandle) { eprintln!("Error registering initial shortcut: {:?}", e); } - let state_clone = state.clone(); + let state_clone = Arc::clone(&state); app_handle.listen("update-shortcut", move |event| { let payload_str = event.payload().replace("\\\"", "\""); let trimmed_str = payload_str.trim_matches('"'); @@ -55,7 +56,7 @@ pub fn setup(app_handle: tauri::AppHandle) { } }); - let state_clone = state.clone(); + let state_clone = Arc::clone(&state); app_handle.listen("save_keybind", move |event| { let payload_str = event.payload().to_string(); unregister_current_hotkey(&state_clone); From 81db3e5f7930844d99c7a4f3c90a2125a27cd359 Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:45:49 +0100 Subject: [PATCH 5/6] fix: aptabase plugin dependency not found --- src-tauri/Cargo.lock | 1 + src-tauri/Cargo.toml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ebfbe74..2c96021 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5713,6 +5713,7 @@ dependencies = [ [[package]] name = "tauri-plugin-aptabase" version = "0.5.1" +source = "git+https://github.com/0PandaDEV/tauri-plugin-aptabase?branch=v2#c843c6b5b814fcc9daeb3f7fe4c67276c38bc6dd" dependencies = [ "futures", "log", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 43259a1..ec6bda7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -24,8 +24,7 @@ tauri-plugin-fs = "2.2.0" tauri-plugin-clipboard = "2.1.11" tauri-plugin-prevent-default = "1.0.2" tauri-plugin-global-shortcut = "2.2.0" -# tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "v2" } -tauri-plugin-aptabase = { path = "C:\\Users\\pandadev\\Documents\\Developer\\Rust\\tauri-plugin-aptabase" } +tauri-plugin-aptabase = { git = "https://github.com/0PandaDEV/tauri-plugin-aptabase", branch = "v2" } sqlx = { version = "0.8.3", features = [ "runtime-tokio-native-tls", "sqlite", From 761914637cd99f28b1c67a92b043ffd550a66096 Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Wed, 29 Jan 2025 17:46:02 +0100 Subject: [PATCH 6/6] fix: link and color types cannot be pasted --- src-tauri/src/api/clipboard.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-tauri/src/api/clipboard.rs b/src-tauri/src/api/clipboard.rs index 381a7d9..f06881c 100644 --- a/src-tauri/src/api/clipboard.rs +++ b/src-tauri/src/api/clipboard.rs @@ -33,6 +33,8 @@ pub async fn write_and_paste( match content_type.as_str() { "text" => clipboard.write_text(content).map_err(|e| e.to_string())?, + "link" => clipboard.write_text(content).map_err(|e| e.to_string())?, + "color" => clipboard.write_text(content).map_err(|e| e.to_string())?, "image" => { clipboard.write_image_base64(content).map_err(|e| e.to_string())?; }