Skip to content

Commit

Permalink
进一步优化返回体验
Browse files Browse the repository at this point in the history
  • Loading branch information
qinlili23333 committed Dec 13, 2023
1 parent 54f666c commit 8f56e1a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
12 changes: 9 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ <H3>去全部歌单里添加一些吧</H3>
await sleep(295);
document.getElementById("floatMenu").style.overflowY = "auto";
if (window.CloseWatcher) {
let MenuBack = new CloseWatcher();
window.MenuBack = new CloseWatcher();
MenuBack.onclose = () => {
lastClickMenu = lastClick;
hideMenu();
Expand All @@ -768,6 +768,9 @@ <H3>去全部歌单里添加一些吧</H3>
document.getElementById("floatMenuContainer").style.display = "none";
menuList.innerHTML = "";
document.getElementById("floatMenu").style.transition = "max-height 0.3s linear";
if (window.CloseWatcher) {
window.MenuBack.destroy();
}
};
window.addEventListener("resize", async (event) => {
if (document.getElementById("floatMenuContainer").style.display == "block") {
Expand Down Expand Up @@ -1109,6 +1112,9 @@ <H3>去全部歌单里添加一些吧</H3>
await sleep(200);
audioFilesModule.style.display = "none";
audioFilesModule.innerHTML = "";
if (window.CloseWatcher) {
window.FolderBack.destroy();
}
break;
};
case 1: {
Expand All @@ -1119,7 +1125,7 @@ <H3>去全部歌单里添加一些吧</H3>
await sleep(200);
audioFolderModule.style.display = "none";
if (window.CloseWatcher) {
let FolderBack = new CloseWatcher();
window.FolderBack = new CloseWatcher();
FolderBack.onclose = () => {
switchListDisplay(0);
};
Expand Down Expand Up @@ -1623,7 +1629,7 @@ <H3>去全部歌单里添加一些吧</H3>
document.title = "545在线";
if (window.CloseWatcher) {
const createWatcher = () => {
let WindowBack = new CloseWatcher();
window.WindowBack = new CloseWatcher();
WindowBack.onclose = () => {
setTempStatus("2秒内再按一次返回退出", 2000);
setTimeout(createWatcher, 2000);
Expand Down
15 changes: 15 additions & 0 deletions settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ <H3 style="margin:auto;" id="titleText">设置</H3>
document.getElementById("floatMenu").style.marginTop = "100vh";
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
if (window.CloseWatcher) {
window.FrameBack.destroy();
}
}
if (event.data.startsWith("http")) {
document.getElementById("loading").style.display = "block";
Expand All @@ -593,13 +596,25 @@ <H3 style="margin:auto;" id="titleText">设置</H3>
document.getElementById("floatMenu").style.marginTop = "10vh";
document.getElementById("loading").style.display = "block";
rebuildFrame(url);
if (window.CloseWatcher) {
window.FrameBack = new CloseWatcher();
FrameBack.onclose = async () => {
document.getElementById("floatMenu").style.marginTop = "100vh";
document.getElementById("floatMenuContainer").style.opacity = 0;
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
};
}
}
document.getElementById("closeBtn").addEventListener("click", async (event) => {
event.stopPropagation();
document.getElementById("floatMenu").style.marginTop = "100vh";
document.getElementById("floatMenuContainer").style.opacity = 0;
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
if (window.CloseWatcher) {
window.FrameBack.destroy();
}
})
if (localStorage.randomMethod == "list") {
document.getElementById("randomCheckbox").checked = true;
Expand Down
4 changes: 2 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var APP_PREFIX = '545在线'
var VERSION = '2.2.0.20231212'
var VERSION_AZUSA_PATCH_USE = '2.1.1.20230910'
var VERSION = '2.2.1.20231213'
var VERSION_AZUSA_PATCH_USE = '2.2.0.20231212'
var AZUSA_PATCH_SKIP_LIST = [
'./cursor/normal.png',
'./icon.webp',
Expand Down
15 changes: 15 additions & 0 deletions tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ <H3 style="margin:auto;" id="titleText">工具箱</H3>
document.getElementById("floatMenu").style.marginTop = "100vh";
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
if (window.CloseWatcher) {
window.FrameBack.destroy();
}
}
if (event.data.startsWith("http")) {
document.getElementById("loading").style.display = "block";
Expand All @@ -285,6 +288,15 @@ <H3 style="margin:auto;" id="titleText">工具箱</H3>
if (wide) {
document.getElementById("setFrame").style.maxWidth = "100vw";
}
if (window.CloseWatcher) {
window.FrameBack = new CloseWatcher();
FrameBack.onclose = async () => {
document.getElementById("floatMenu").style.marginTop = "100vh";
document.getElementById("floatMenuContainer").style.opacity = 0;
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
};
}
}
document.getElementById("closeBtn").addEventListener("click", async (event) => {
event.stopPropagation();
Expand All @@ -293,6 +305,9 @@ <H3 style="margin:auto;" id="titleText">工具箱</H3>
await sleep(500);
document.getElementById("floatMenuContainer").style.display = "none";
document.getElementById("floatMenu").removeChild(document.getElementById("setFrame"));
if (window.CloseWatcher) {
window.FrameBack.destroy();
}
})
window.titleCount = 0;
document.getElementById("titleText").addEventListener("click", () => {
Expand Down
4 changes: 2 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"success": true,
"latest": "2.2.0.20231212",
"azusa_patch_avaliable": "2.1.1.20230910"
"latest": "2.2.1.20231213",
"azusa_patch_avaliable": "2.2.0.20231212"
}

0 comments on commit 8f56e1a

Please sign in to comment.