From d7d7e3e522d81aff9bf4a3e9add83fc3b73d2f58 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 12 Mar 2023 16:17:45 +0800 Subject: [PATCH] :sparkles: Save to Desktop --- src-tauri/src/main.rs | 6 +++--- src-tauri/tauri.conf.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 2191999..0a0d8f2 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -26,7 +26,7 @@ use wry::application::window::Icon; #[cfg(any(target_os = "linux", target_os = "windows"))] use wry::webview::WebContext; -use dirs::download_dir; +use dirs::desktop_dir; use std::path::PathBuf; enum UserEvent { @@ -147,7 +147,7 @@ fn main() -> wry::Result<()> { let download_started = { let proxy = proxy.clone(); move |uri: String, default_path: &mut PathBuf| { - let path = download_dir() + let path = desktop_dir() .unwrap() .join(default_path.display().to_string()) .as_path() @@ -243,7 +243,7 @@ fn main() -> wry::Result<()> { Event::UserEvent(UserEvent::DownloadComplete(_, success)) => { println!("Succeeded: {success}"); if success { - let _ = webview.evaluate_script("window.pakeToast('Save in downloads folder')"); + let _ = webview.evaluate_script("window.pakeToast('已保存到桌面~')"); } else { println!("No output path") } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index bd260ec..ca64d28 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,7 +6,7 @@ "tauri": { "windows": [ { - "url": "https://weread.qq.com/", + "url": "https://github.com/tw93/Pake/releases/tag/V1.0.6", "transparent": true, "fullscreen": false, "width": 1200,