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:
@@ -149,6 +149,22 @@ export async function editAudioSource(sourceId) {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Clone ─────────────────────────────────────────────────────
|
||||
|
||||
export async function cloneAudioSource(sourceId) {
|
||||
try {
|
||||
const resp = await fetchWithAuth(`/audio-sources/${sourceId}`);
|
||||
if (!resp.ok) throw new Error('fetch failed');
|
||||
const data = await resp.json();
|
||||
delete data.id;
|
||||
data.name = data.name + ' (copy)';
|
||||
await showAudioSourceModal(data.source_type, data);
|
||||
} catch (e) {
|
||||
if (e.isAuth) return;
|
||||
showToast(e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// ── Delete ────────────────────────────────────────────────────
|
||||
|
||||
export async function deleteAudioSource(sourceId) {
|
||||
|
||||
Reference in New Issue
Block a user