fix: hide webapp list content while a webapp is open
This commit is contained in:
@@ -476,6 +476,13 @@ body {
|
|||||||
|
|
||||||
/* webAPP 顶栏:浮层玻璃条 + 标签面板 */
|
/* webAPP 顶栏:浮层玻璃条 + 标签面板 */
|
||||||
/* webapp topbar: floating glass bar + tab panel */
|
/* webapp topbar: floating glass bar + tab panel */
|
||||||
|
/* 前台有 webapp 时隐藏 webapp 列表内容,避免半透明顶栏透出列表控件 */
|
||||||
|
/* Hide the webapp list content while a webapp is open, so the translucent topbar
|
||||||
|
doesn't show the list controls through it */
|
||||||
|
body.webapp-active [data-page="webapplist"] {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
#web-topbar {
|
#web-topbar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ window.showTopbar = function (tabs) {
|
|||||||
bar.style.display = tabs.length ? 'flex' : 'none';
|
bar.style.display = tabs.length ? 'flex' : 'none';
|
||||||
const panel = document.getElementById('tab-panel');
|
const panel = document.getElementById('tab-panel');
|
||||||
if (panel && !tabs.length) panel.style.display = 'none';
|
if (panel && !tabs.length) panel.style.display = 'none';
|
||||||
|
// 有 webapp 时隐藏 webapplist 页面内容(避免半透明顶栏透出列表控件),无 webapp 时恢复
|
||||||
|
// Hide the webapp list content while a webapp is open (so the translucent topbar
|
||||||
|
// doesn't show the list controls through it); restore when none are open
|
||||||
|
document.body.classList.toggle('webapp-active', tabs.length > 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 标签面板:列出所有标签,点击切换,× 关闭
|
// 标签面板:列出所有标签,点击切换,× 关闭
|
||||||
|
|||||||
Reference in New Issue
Block a user