Remove redundant single-tab bars from embedded workspace pages

This commit is contained in:
unimatrixgit 2026-11-16 14:35:23 +01:00
commit f7c8586594

View file

@ -35,7 +35,7 @@ export function mountNativeService(host,id,{fetcher=fetch,singleHeading=false,in
const workspace=el('section',undefined,'cp-v2-native-workspace'),tools=el('details',undefined,'pb-workspace-details'),retry=el('button','Reload workspace');retry.type='button';tools.append(el('summary','+ Workspace details'),el('p','Native workspace connection tools'),retry);workspace.append(status);
const container=el('div',undefined,'cp-v2-native-frame');workspace.append(container,tools);
const {root}=createCPV2Page({shellHost:singleHeading?host:null,title:spec.title,description:spec.description,artwork:id==='forum-admin'?'nav-boards-v2.webp':'nav-support-v2.webp',tabs:[{id:'native-workspace',label:spec.label,content:workspace}]});host.replaceChildren(root);
// Clan navigation already lives in the shell; a single repeated tab adds no action.
// A single embedded workspace needs no repeated tab; navigation belongs to the CP shell.
if(id==='clans'){
root.querySelector('.cp-v2-template-tabs')?.remove();
const panel=root.querySelector('[data-tab-id="native-workspace"]');