diff --git a/static/index.html b/static/index.html index d25c650..75b4270 100644 --- a/static/index.html +++ b/static/index.html @@ -26,7 +26,7 @@ - + diff --git a/static/js/voice-library.js b/static/js/voice-library.js index 558322a..fe21c6c 100644 --- a/static/js/voice-library.js +++ b/static/js/voice-library.js @@ -1489,6 +1489,11 @@ function renderVoiceList() { if (_tvBtn) { _tvBtn.classList.toggle('active', !!window._voiceTableView); document.querySelector('.voices-workbench')?.classList.toggle('table-view', !!window._voiceTableView); + const editBtn = document.getElementById('voice-table-edit-btn'); + if (editBtn) { + editBtn.style.display = window._voiceTableView ? 'inline-flex' : 'none'; + editBtn.classList.toggle('active', !!window._voiceTableEditMode); + } } // Apply sidebar category filter @@ -3062,6 +3067,13 @@ function _bulkUpdate() { document.querySelectorAll('.vl-bulk-cb').forEach(cb => { cb.checked = _bulkSelected.has(cb.dataset.id); }); + + const headerCb = document.getElementById('vl-select-all-header'); + if (headerCb) { + const rows = [...document.querySelectorAll('#voice-list .vl-row')].filter(r => r.dataset.id); + const allSelected = rows.length > 0 && rows.every(r => _bulkSelected.has(r.dataset.id)); + headerCb.checked = allSelected; + } } function _bulkToggle(id, checked) { @@ -3103,16 +3115,15 @@ $('vl-bulk-select-all')?.addEventListener('click', () => { _bulkUpdate(); }); -// Always-visible Select-all toggle in the sort bar (the bulk bar only appears once +// Always-visible Select-all toggle in the table header (the bulk bar only appears once // something is selected, so this is the entry point). Selects every visible row, or // clears the selection if they're all already selected. -$('vl-select-all-visible')?.addEventListener('click', () => { +$('vl-select-all-header')?.addEventListener('change', (e) => { const rows = [...document.querySelectorAll('#voice-list .vl-row')].filter(r => r.dataset.id); - const allSelected = rows.length > 0 && rows.every(r => _bulkSelected.has(r.dataset.id)); - if (allSelected) { - rows.forEach(r => _bulkSelected.delete(r.dataset.id)); - } else { + if (e.target.checked) { rows.forEach(r => _bulkSelected.add(r.dataset.id)); + } else { + rows.forEach(r => _bulkSelected.delete(r.dataset.id)); } _bulkUpdate(); }); diff --git a/static/sections/s-voices.html b/static/sections/s-voices.html index bc712b3..f6d3474 100644 --- a/static/sections/s-voices.html +++ b/static/sections/s-voices.html @@ -75,7 +75,6 @@ -