Add clone buttons, fix card navigation highlight, UI polish
- Add clone buttons to Audio Source and Value Source cards - Fix command palette navigation destroying card highlight by skipping redundant data reload (skipLoad option on switchTab) - Convert value source modal sliders to value-in-label pattern - Change audio/value source modal footers to icon-only buttons - Remove separator lines between card sections - Add UI conventions to CLAUDE.md (card appearance, modal footer, sliders) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ function _setHash(tab, subTab) {
|
||||
|
||||
let _suppressHashUpdate = false;
|
||||
|
||||
export function switchTab(name, { updateHash = true } = {}) {
|
||||
export function switchTab(name, { updateHash = true, skipLoad = false } = {}) {
|
||||
document.querySelectorAll('.tab-btn').forEach(btn => {
|
||||
const isActive = btn.dataset.tab === name;
|
||||
btn.classList.toggle('active', isActive);
|
||||
@@ -40,11 +40,11 @@ export function switchTab(name, { updateHash = true } = {}) {
|
||||
|
||||
if (name === 'dashboard') {
|
||||
// Use window.* to avoid circular imports with feature modules
|
||||
if (apiKey && typeof window.loadDashboard === 'function') window.loadDashboard();
|
||||
if (!skipLoad && apiKey && typeof window.loadDashboard === 'function') window.loadDashboard();
|
||||
} else {
|
||||
if (typeof window.stopPerfPolling === 'function') window.stopPerfPolling();
|
||||
if (typeof window.stopUptimeTimer === 'function') window.stopUptimeTimer();
|
||||
if (!apiKey) return;
|
||||
if (!apiKey || skipLoad) return;
|
||||
if (name === 'streams') {
|
||||
if (typeof window.loadPictureSources === 'function') window.loadPictureSources();
|
||||
} else if (name === 'targets') {
|
||||
|
||||
Reference in New Issue
Block a user