Enhance version selection UI with thumbnails and file size; improve modal click handling

This commit is contained in:
Will Miao
2025-02-14 15:45:49 +08:00
parent d66603d7e0
commit a2428b31b5
4 changed files with 107 additions and 19 deletions

View File

@@ -54,12 +54,14 @@ export class ModalManager {
isOpen: false
});
// Add click outside to close for each modal
config.element.addEventListener('click', (e) => {
if (e.target === config.element) {
this.closeModal(id);
}
});
// Only add click outside handler if it's not the download modal
if (id !== 'downloadModal') {
config.element.addEventListener('click', (e) => {
if (e.target === config.element) {
this.closeModal(id);
}
});
}
}
getModal(id) {