update UI after select category and subcategory

This commit is contained in:
2026-06-15 17:37:46 +02:00
parent cea97332b4
commit 460f357d48

View File

@ -335,6 +335,8 @@ const App = {
} else {
document.getElementById('custom-category-group').classList.add('hidden');
}
this.updateUI();
},
renderSubcategories(categoryId) {
@ -353,6 +355,7 @@ const App = {
chip.addEventListener('click', () => {
this.state.selection.subcategory = sub.id;
this.renderSubcategories(categoryId);
this.updateUI();
});
container.appendChild(chip);
@ -570,7 +573,7 @@ const App = {
async downloadWebsite() {
const btn = document.getElementById('btn-download-zip');
const originalText = btn.textContent;
btn.disabled = true;
btn.textContent = 'Pripravujem archív...';
@ -784,7 +787,7 @@ const App = {
try {
const result = await this.apiCall('generateWebsite');
if (result.success) {
this.startPolling();
}
} catch (error) {
@ -886,5 +889,3 @@ const App = {
};
document.addEventListener('DOMContentLoaded', () => App.init());
App.init());