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;";