From f8ec4f8fb4a3d88990cf6d314cf29e0f03babe98 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 14 Jan 2023 00:14:41 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 5 +---- src-tauri/src/pake.js | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 375bc09..fb0eed7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -153,10 +153,7 @@ fn main() -> wry::Result<()> { .to_path_buf(); *default_path = path.clone(); let submitted = proxy - .send_event(UserEvent::DownloadStarted( - uri, - path.display().to_string(), - )) + .send_event(UserEvent::DownloadStarted(uri, path.display().to_string())) .is_ok(); submitted } diff --git a/src-tauri/src/pake.js b/src-tauri/src/pake.js index 863be55..106be46 100644 --- a/src-tauri/src/pake.js +++ b/src-tauri/src/pake.js @@ -375,11 +375,12 @@ function Toast(msg) { m.style.cssText = "max-width:60%;min-width: 180px;padding:0 8px;height: 36px;color: rgb(255, 255, 255);line-height: 36px;text-align: center;border-radius: 4px;position: fixed;bottom:16px;right: 16px;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.9);font-size: 14px;"; document.body.appendChild(m); setTimeout(function() { + const d = 0.5; m.style.transition = 'transform ' + d + 's ease-in, opacity ' + d + 's ease-in'; m.style.opacity = '0'; setTimeout(function() { document.body.removeChild(m) - }, 500); - }, 3000); + }, d * 1000); + }, 2500); }