支持pake内的页面下载功能

This commit is contained in:
Tw93
2023-01-13 23:50:21 +08:00
parent 1e63958015
commit d18389e361
4 changed files with 168 additions and 23 deletions

16
src-tauri/src/pake.js vendored
View File

@@ -367,3 +367,19 @@ function zoomIn() {
function zoomOut() {
zoomCommon((htmlZoom) => `${Math.max(parseInt(htmlZoom) - 10, 30)}%`);
}
function Toast(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;";
document.body.appendChild(m);
setTimeout(function() {
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);
}