Merge branch 'develop' of https://github.com/ciderapp/Cider into develop

This commit is contained in:
vapormusic 2022-02-12 08:20:08 +07:00
commit b3efe18f82
2 changed files with 6 additions and 2 deletions

View file

@ -359,7 +359,11 @@ export class BrowserWindow {
ipcMain.on("get-themes", (event, _key) => {
if (existsSync(utils.getPath("themes"))) {
event.returnValue = readdirSync(utils.getPath("themes"));
let files = readdirSync(utils.getPath("themes"));
let themes = files.filter((file) => {
return file.endsWith(".less");
});
event.returnValue = themes;
} else {
event.returnValue = [];
}

View file

@ -130,7 +130,7 @@
<select class="md-select" @change="$root.setTheme($root.cfg.visual.theme)" v-model="$root.cfg.visual.theme">
<option value="default.less">{{$root.getLz('settings.option.visual.theme.default')}}</option>
<option value="dark.less">{{$root.getLz('settings.option.visual.theme.dark')}}</option>
<option v-for="theme in themes" :value="theme">{{ theme }}</option>
<option v-for="theme in themes" :value="theme">{{ theme.replace(".less", "") }}</option>
</select>
</div>
</div>