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:
@@ -108,4 +108,18 @@ themeSelect.addEventListener("change", (e) => {
|
||||
}
|
||||
});
|
||||
|
||||
async function refreshThemes() {
|
||||
loadedThemes = await window.electronAPI.reloadThemes();
|
||||
populateThemeSelect(loadedThemes);
|
||||
|
||||
const features = await window.electronAPI.getFeatures();
|
||||
const savedId = features.theme;
|
||||
const theme = loadedThemes.find(t => t.id === savedId) || loadedThemes[0];
|
||||
|
||||
themeSelect.value = theme.id;
|
||||
applyTheme(theme);
|
||||
}
|
||||
|
||||
window.refreshThemes = refreshThemes;
|
||||
|
||||
initThemes();
|
||||
Reference in New Issue
Block a user