🐛 优化一下

This commit is contained in:
Tw93
2023-01-14 10:44:35 +08:00
parent 3601865a75
commit 19ff0746d3
2 changed files with 2 additions and 2 deletions

View File

@@ -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")
}

View File

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