feat: webapp multi-tab JS bridge and multi-WebView management
This commit is contained in:
@@ -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';
|
||||
};
|
||||
|
||||
// 标签面板:列出所有标签,点击切换,× 关闭
|
||||
|
||||
Reference in New Issue
Block a user