From 19ff0746d3ba1bed9e835319105103cdb34a2be5 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 14 Jan 2023 10:44:35 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/main.rs | 2 +- src-tauri/src/pake.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index c136d52..3ff5c15 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -244,7 +244,7 @@ fn main() -> wry::Result<()> { Event::UserEvent(UserEvent::DownloadComplete(_, success)) => { println!("Succeeded: {}", success); if success { - let _ = webview.evaluate_script("window.Toast('Save in downloads folder')"); + let _ = webview.evaluate_script("window.pakeToast('Save in downloads folder')"); } else { println!("No output path") } diff --git a/src-tauri/src/pake.js b/src-tauri/src/pake.js index 106be46..b761ff7 100644 --- a/src-tauri/src/pake.js +++ b/src-tauri/src/pake.js @@ -369,7 +369,7 @@ function zoomOut() { } -function Toast(msg) { +function pakeToast(msg) { const m = document.createElement('div'); m.innerHTML = 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;";