mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Feat: Add theme reloading functionality with refresh button in settings panel
This commit is contained in:
@@ -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 };
|
||||
Reference in New Issue
Block a user