diff --git a/internal/web/static/app.css b/internal/web/static/app.css index 12bc281..9bf3bcf 100644 --- a/internal/web/static/app.css +++ b/internal/web/static/app.css @@ -127,3 +127,46 @@ input:focus { outline: 0; border-color: var(--accent); } .enforce-note { opacity: 0.8; font-size: 0.85em; } .enforce-toggle { display: flex; align-items: center; gap: 0.4em; } .hint { opacity: 0.7; font-size: 0.85em; margin: 0.2em 0 0.6em; } + +/* Settings: header gear + overlay modal */ +.gear { + background: none; border: 0; color: var(--ink-dim); cursor: pointer; + font-size: 14px; padding: 0 4px; vertical-align: middle; +} +.gear:hover { color: var(--accent); } + +.overlay { + position: fixed; inset: 0; background: rgba(0,0,0,.5); + display: flex; align-items: flex-start; justify-content: center; + padding: 8vh 16px; z-index: 10; +} +.overlay[hidden] { display: none; } +.modal { + width: 100%; max-width: 520px; background: var(--panel); + border: 1px solid var(--line); border-radius: 14px; padding: 20px; +} +.modal h2 { margin: 0 0 12px; font-size: 16px; } +.modal-actions { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; } +.modal-actions .btn { margin-top: 0; } +.path-row { display: flex; gap: 8px; align-items: center; } +.path-row input { flex: 1; } +.path-row .btn { margin-top: 0; white-space: nowrap; } +.set-error { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 1em; } + +.browse { + margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; + background: var(--bg); max-height: 260px; overflow-y: auto; +} +.browse[hidden] { display: none; } +.browse-dir { + padding: 8px 10px; font-size: 12px; color: var(--ink-dim); + font-family: ui-monospace, monospace; border-bottom: 1px solid var(--line); + position: sticky; top: 0; background: var(--bg); +} +.browse-list { list-style: none; margin: 0; padding: 4px 0; } +.browse-list button { + width: 100%; text-align: left; background: none; border: 0; cursor: pointer; + color: var(--ink); font: inherit; font-size: 13px; padding: 5px 12px; + font-family: ui-monospace, monospace; +} +.browse-list button:hover { background: var(--line); color: var(--accent); } diff --git a/internal/web/static/app.js b/internal/web/static/app.js index 98adf5a..0bf15d9 100644 --- a/internal/web/static/app.js +++ b/internal/web/static/app.js @@ -181,10 +181,7 @@ function updatePlanningKnowledge(k) { else line = 'profile unreadable'; el.innerHTML = ` `; - document.getElementById('knowChange').onclick = () => { - const next = prompt('Profile file path (blank = default):', k.path || ''); - if (next !== null) post('/knowledge/path', { path: next.trim() }); - }; + document.getElementById('knowChange').onclick = openSettings; } // reflectionBlock renders the reviewer's recap on the Review screen. idle/nil or @@ -314,3 +311,99 @@ function render(state) { const es = new EventSource('/events'); es.onmessage = (e) => render(JSON.parse(e.data)); es.onerror = () => { view.textContent = 'disconnected — is antidriftd running?'; }; + +// ---- Settings overlay ---- +function openSettings() { + fetch('/settings').then(r => r.json()).then(s => { + const ov = document.getElementById('settingsOverlay'); + ov.innerHTML = ` +