Fix CSP violations and ignoreAvailable reference error
- Add .hidden utility class to style.css for CSP compliance - Replace all inline style='display: none' with class='hidden' in HTML - Update all UI modules to use classList.add/remove instead of style.display - Fix ignoreAvailable reference error in history.js (use state.ignoreAvailable) - Rebuild client bundle with vite
This commit is contained in:
@@ -26,20 +26,20 @@ export function initTabs() {
|
||||
export function activateTab(tab) {
|
||||
const downloadsTab = document.getElementById('downloads-tab');
|
||||
const historyTab = document.getElementById('history-tab');
|
||||
const downloadsSection = document.getElementById('downloads-section');
|
||||
const historySection = document.getElementById('history-section');
|
||||
const downloadsSection = document.getElementById('tab-downloads');
|
||||
const historySection = document.getElementById('tab-history');
|
||||
|
||||
if (tab === 'downloads') {
|
||||
downloadsTab.classList.add('active');
|
||||
historyTab.classList.remove('active');
|
||||
downloadsSection.style.display = 'block';
|
||||
historySection.style.display = 'none';
|
||||
downloadsSection.classList.remove('hidden');
|
||||
historySection.classList.add('hidden');
|
||||
saveActiveTab('downloads');
|
||||
} else if (tab === 'history') {
|
||||
historyTab.classList.add('active');
|
||||
downloadsTab.classList.remove('active');
|
||||
historySection.style.display = 'block';
|
||||
downloadsSection.style.display = 'none';
|
||||
historySection.classList.remove('hidden');
|
||||
downloadsSection.classList.add('hidden');
|
||||
saveActiveTab('history');
|
||||
loadHistory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user