Feat: Add theme reloading functionality with refresh button in settings panel

This commit is contained in:
MasterAcnolo
2026-04-12 09:32:15 +02:00
parent ebb48f4f8b
commit d05b9e2511
7 changed files with 83 additions and 6 deletions

View File

@@ -178,4 +178,11 @@ function getThemes() {
return cachedThemes ?? [];
}
module.exports = { initThemes, getThemes };
async function reloadThemes() {
const themes = await loadThemesFromFolder();
cachedThemes = themes.sort((a, b) => getThemeOrder(a.id) - getThemeOrder(b.id));
logger.info(`Themes reloaded: ${cachedThemes.length} theme(s)`);
return cachedThemes;
}
module.exports = { initThemes, getThemes , reloadThemes };