🎨 优化代码
This commit is contained in:
@@ -153,10 +153,7 @@ fn main() -> wry::Result<()> {
|
|||||||
.to_path_buf();
|
.to_path_buf();
|
||||||
*default_path = path.clone();
|
*default_path = path.clone();
|
||||||
let submitted = proxy
|
let submitted = proxy
|
||||||
.send_event(UserEvent::DownloadStarted(
|
.send_event(UserEvent::DownloadStarted(uri, path.display().to_string()))
|
||||||
uri,
|
|
||||||
path.display().to_string(),
|
|
||||||
))
|
|
||||||
.is_ok();
|
.is_ok();
|
||||||
submitted
|
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;";
|
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);
|
document.body.appendChild(m);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
const d = 0.5;
|
||||||
m.style.transition = 'transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
|
m.style.transition = 'transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
|
||||||
m.style.opacity = '0';
|
m.style.opacity = '0';
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
document.body.removeChild(m)
|
document.body.removeChild(m)
|
||||||
}, 500);
|
}, d * 1000);
|
||||||
}, 3000);
|
}, 2500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user