diff --git a/portal/static/app.css b/portal/static/app.css index 8b02f3c..e8df83b 100644 --- a/portal/static/app.css +++ b/portal/static/app.css @@ -216,28 +216,6 @@ input:focus, textarea:focus, select:focus { border-color: var(--ds-ac) !importan /* ===== TREE TABLE ===== */ #reqTree { border-collapse: collapse; width: 100%; font-size: 13px; } -/* ===== PROJECT SWITCHER ===== */ -#projectSwitcher { - appearance: none; - -webkit-appearance: none; - background: transparent; - border: none; - outline: none; - color: var(--ds-tx); - font-size: 1.25rem; - font-weight: 600; - cursor: pointer; - padding: 0; - margin: 0; - max-width: 320px; -} -#projectSwitcher option { - background: var(--ds-sf); - color: var(--ds-tx); - font-size: 13px; - font-weight: 400; -} - /* ===== TYPE HIERARCHY ===== */ /* Level 1 — Logo / Page title : 2xl (19.5px) — set inline */ /* Level 2 — Project name in header : xl (16.25px) — set inline */ diff --git a/portal/templates/app/project.html b/portal/templates/app/project.html index 38407e1..44095b8 100644 --- a/portal/templates/app/project.html +++ b/portal/templates/app/project.html @@ -2,10 +2,14 @@
{{end}} @@ -331,25 +335,18 @@ const d = parseData(p.data_text); const name = d.name || p.summary_text || p.summary || 'Untitled'; document.title = name + ' — Dealspace'; - // Populate project switcher - const sel = document.getElementById('projectSwitcher'); - const opt = document.getElementById('projectName'); - opt.value = projectID; - opt.textContent = name; - // Load all projects for switcher + document.getElementById('projectName').textContent = name; fetchAPI('/api/projects').then(r=>r.json()).then(projects=>{ - sel.innerHTML = ''; - (projects||[]).forEach(p=>{ - const o = document.createElement('option'); - o.value = p.entry_id; + const menu = document.getElementById('projectMenu'); + menu.innerHTML = (projects||[]).map(p=>{ const d = p.data_text ? (()=>{try{return JSON.parse(p.data_text)}catch{return{}}})() : {}; - o.textContent = d.name || p.search_key || p.entry_id; - if(p.entry_id === projectID) o.selected = true; - sel.appendChild(o); - }); - }).catch(()=>{ - sel.innerHTML = ``; - }); + const pname = d.name || p.search_key || p.entry_id; + const active = p.entry_id === projectID; + return `