From 5a6cbd93360eb1c6f51cf3a217dc9ded0b2ac73b Mon Sep 17 00:00:00 2001 From: YanJi Date: Tue, 1 Oct 2024 11:58:40 +0800 Subject: [PATCH] Sync 0.2.1 --- .../assets/components/ContextMenu.css | 4 +- src/frontend/assets/components/SimAP.css | 2 - src/frontend/assets/components/SimAP.js | 1 + src/frontend/assets/components/shutdown.html | 6 +- src/frontend/assets/components/webview.html | 2 +- src/frontend/assets/main.css | 6 +- src/frontend/assets/main.js | 152 +++++++++++++++--- src/frontend/main.html | 2 +- src/main.js | 9 +- 9 files changed, 150 insertions(+), 34 deletions(-) diff --git a/src/frontend/assets/components/ContextMenu.css b/src/frontend/assets/components/ContextMenu.css index 275b3a6..b7a6de0 100644 --- a/src/frontend/assets/components/ContextMenu.css +++ b/src/frontend/assets/components/ContextMenu.css @@ -41,9 +41,9 @@ border-top: solid 1px rgb(0 0 0 / .05); } .context-menu .disabled { - color: rgb(0 0 0 / .5) !important; + color: black !important; background-color: transparent !important; - opacity: 1 !important; + opacity: .5 !important; } .context-menu .sub { diff --git a/src/frontend/assets/components/SimAP.css b/src/frontend/assets/components/SimAP.css index 28e3a46..2012241 100644 --- a/src/frontend/assets/components/SimAP.css +++ b/src/frontend/assets/components/SimAP.css @@ -34,8 +34,6 @@ body.albumScale:not(.playing) .controls #album{transform:scale(.95);} .playing .controls .buttons>.play>i:first-child,.playing .bottom .center>.play>i:first-child{opacity:0;transform:scale(.4);} .playing .controls .buttons>.play>i:last-child,.playing .bottom .center>.play>i:last-child{opacity:1;transform:none;} .controls .buttons>.play i:first-child,.bottom .center>.play i:first-child{padding-left:3.5px;} -.playBtnColor .controls .buttons{color:var(--SimAPTheme);} -.playBtnColor .bottom .center>.play{color:#1E9FFF;} /* 音量控制 */ .volume .controls .buttons>div{width:0;opacity:0!important;} .volume .controls .buttons>.volBtn{width:180px;color:rgba(0,0,0,.7);background:rgba(0,0,0,.05)!important;transform:none!important;opacity:1!important;mask:unset;border-radius:100px;} diff --git a/src/frontend/assets/components/SimAP.js b/src/frontend/assets/components/SimAP.js index 85780f9..ee7bed6 100644 --- a/src/frontend/assets/components/SimAP.js +++ b/src/frontend/assets/components/SimAP.js @@ -220,6 +220,7 @@ const SimAPControls = { if (isManual) SleepMode.checkManualOperation(); if (document.body.classList.contains("musicLoading")) return; const audio = document.getElementById("audio"); + if (!audio || !audio.src) return; const isPlay = audio.paused; document.body.classList[isPlay ? "add" : "remove"]("playing"); SimAPControls.loadAudioState(); diff --git a/src/frontend/assets/components/shutdown.html b/src/frontend/assets/components/shutdown.html index abb4e64..f15546d 100644 --- a/src/frontend/assets/components/shutdown.html +++ b/src/frontend/assets/components/shutdown.html @@ -25,10 +25,10 @@