diff --git a/package.json b/package.json index 4563ac7..ac91fea 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,7 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": ">=2.0.0-beta.0", - "@tauri-apps/plugin-os": "2.0.0-beta.2", - "@tauri-apps/plugin-shell": ">=2.0.0-beta.0", + "@tauri-apps/api": ">=2.0.0-beta.8", "pinia": "^2.1.7", "vue": "^3.3.4", "vue-router": "4" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0ce2459..1bdb9de 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -11,8 +11,7 @@ edition = "2021" tauri-build = { version = "2.0.0-beta", features = [] } [dependencies] -tauri = { version = "2.0.0-beta", features = ["macos-private-api"] } -tauri-plugin-os = "2.0.0-beta" +tauri = { version = "2.0.0-beta.15", features = ["macos-private-api"] } serde = { version = "1", features = ["derive"] } serde_json = "1" anyhow = "1.0" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index dab3777..774080e 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -13,8 +13,6 @@ "window:allow-close", "window:allow-is-maximizable", "window:allow-start-dragging", - "window:allow-unmaximize", - "os:default", - "os:allow-platform" + "window:allow-unmaximize" ] } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 97d9a5a..620f4f3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -112,6 +112,14 @@ fn start_scrcpy_server( async fn main() { tauri::Builder::default() .setup(|app| { + // let main_window = app.get_webview_window("main").unwrap(); + // main_window + // .set_size(tauri::Size::Logical(tauri::LogicalSize { + // width: 1350., + // height: 750., + // })) + // .unwrap(); + // check resource files ResHelper::res_init( &app.path() @@ -120,44 +128,8 @@ async fn main() { .join("resource"), ) .unwrap(); - - let main_window = app.get_webview_window("main").unwrap(); - - #[cfg(windows)] - { - let scale_factor = main_window.scale_factor().unwrap(); - main_window - .set_size(tauri::Size::Physical(tauri::PhysicalSize { - width: 1350, - height: 750, - })) - .unwrap(); - - main_window - .with_webview(move |webview| { - unsafe { - // see https://docs.rs/webview2-com/0.19.1/webview2_com/Microsoft/Web/WebView2/Win32/struct.ICoreWebView2Controller.html - webview - .controller() - .SetZoomFactor(1.0 / scale_factor) - .unwrap(); - } - }) - .unwrap(); - } - #[cfg(target_os = "macos")] - { - main_window - .set_size(tauri::Size::Logical(tauri::LogicalSize { - width: 1350., - height: 750., - })) - .unwrap(); - } - Ok(()) }) - .plugin(tauri_plugin_os::init()) .invoke_handler(tauri::generate_handler![ adb_devices, forward_server_port, diff --git a/src/App.vue b/src/App.vue index 7b4a681..a199d63 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,7 +29,6 @@ import { .container { background-color: transparent; height: 100%; - overflow: auto; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: 30px 1fr; diff --git a/src/components/Device.vue b/src/components/Device.vue index 8b2276c..36a11d0 100644 --- a/src/components/Device.vue +++ b/src/components/Device.vue @@ -28,6 +28,7 @@ import { NFormItem, NIcon, NSpin, + NScrollbar, DataTableColumns, DropdownOption, useDialog, @@ -213,116 +214,114 @@ async function refreshDevices() {