diff --git a/frontend/package.json b/frontend/package.json index 450687f..88f1fd0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ "@tauri-apps/plugin-http": "2.4.3", "@tauri-apps/plugin-log": "~2", "@tauri-apps/plugin-opener": "^2", - "@tauri-apps/plugin-os": "~2", + "@tauri-apps/plugin-os": "2.2.1", "clsx": "^2.1.1", "fuse.js": "^7.1.0", "jwt-decode": "^4.0.0", diff --git a/frontend/src-tauri/Cargo.toml b/frontend/src-tauri/Cargo.toml index 7ddd0a2..5764d6e 100644 --- a/frontend/src-tauri/Cargo.toml +++ b/frontend/src-tauri/Cargo.toml @@ -29,7 +29,7 @@ log = "0.4" tauri-plugin-http = "2.4.3" tauri-plugin-log = "2" tauri-plugin-fs = "2" -tauri-plugin-os = "2" +tauri-plugin-os = "2.2.1" tauri-plugin-store = "2" [target."cfg(target_os = \"macos\")".dependencies] diff --git a/frontend/src-tauri/capabilities/desktop.toml b/frontend/src-tauri/capabilities/desktop.toml index 5243f9b..c2c639b 100644 --- a/frontend/src-tauri/capabilities/desktop.toml +++ b/frontend/src-tauri/capabilities/desktop.toml @@ -9,6 +9,7 @@ permissions = [ "core:window:allow-show", "core:window:allow-set-focus", "fs:default", + "os:default", { identifier = "http:default", allow = [ { url = "https://haystack.johncosta.tech" }, { url = "http://localhost:3040" }, diff --git a/frontend/src-tauri/capabilities/mobile.toml b/frontend/src-tauri/capabilities/mobile.toml index 5a9deaf..41d80a2 100644 --- a/frontend/src-tauri/capabilities/mobile.toml +++ b/frontend/src-tauri/capabilities/mobile.toml @@ -7,6 +7,7 @@ permissions = [ "core:default", "fs:default", "http:default", + "os:default", { identifier = "http:default", allow = [ { url = "https://haystack.johncosta.tech" }, { url = "http://localhost:3040" }, diff --git a/frontend/src-tauri/src/lib.rs b/frontend/src-tauri/src/lib.rs index daeaf0b..90a58ba 100644 --- a/frontend/src-tauri/src/lib.rs +++ b/frontend/src-tauri/src/lib.rs @@ -1,6 +1,3 @@ -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] -mod window; - #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] mod screenshot; @@ -9,16 +6,14 @@ mod commands; #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] mod shortcut; -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] -mod state; #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] mod utils; -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] -use state::new_shared_watcher_state; +mod state; +mod window; -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] +use state::new_shared_watcher_state; use window::setup_window; #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] @@ -58,12 +53,14 @@ pub fn desktop() { #[cfg(any(target_os = "ios", target_os = "android"))] pub fn android() { tauri::Builder::default() - //.plugin(tauri_plugin_fs::init()) - //.plugin(tauri_plugin_store::Builder::new().build()) - //.plugin(tauri_plugin_http::init()) + .plugin(tauri_plugin_os::init()) + .plugin(tauri_plugin_fs::init()) + .plugin(tauri_plugin_store::Builder::new().build()) + .plugin(tauri_plugin_http::init()) //.plugin(tauri_plugin_sharetarget::init()) .setup(|app| { - // setup_window(app)?; + log::info!("running things!"); + setup_window(app)?; Ok(()) })