🎨 优化代码
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
5
src-tauri/src/pake.js
vendored
5
src-tauri/src/pake.js
vendored
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user