feat: webapp multi-tab JS bridge and multi-WebView management

This commit is contained in:
2026-08-16 17:13:48 +08:00
parent 381b9a57e7
commit 6ca55dbe5f
8 changed files with 419 additions and 35 deletions
@@ -34,6 +34,11 @@ window.showTopbar = function (tabs) {
document.getElementById('tb-tabs').textContent = `标签 (${tabs.length})`;
const active = tabs.find(t => t.active);
document.getElementById('tb-title').textContent = active ? active.name : '';
// 无标签时隐藏顶栏与标签面板(回到桌面)
// Hide the topbar and tab panel when no tabs remain (back to desktop)
bar.style.display = tabs.length ? 'flex' : 'none';
const panel = document.getElementById('tab-panel');
if (panel && !tabs.length) panel.style.display = 'none';
};
// 标签面板:列出所有标签,点击切换,× 关闭