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