Themes in settings will now only display less files
This commit is contained in:
parent
064b287553
commit
7df1b9ba16
2 changed files with 6 additions and 2 deletions
|
@ -359,7 +359,11 @@ export class BrowserWindow {
|
||||||
|
|
||||||
ipcMain.on("get-themes", (event, _key) => {
|
ipcMain.on("get-themes", (event, _key) => {
|
||||||
if (existsSync(utils.getPath("themes"))) {
|
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 {
|
} else {
|
||||||
event.returnValue = [];
|
event.returnValue = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<select class="md-select" @change="$root.setTheme($root.cfg.visual.theme)" v-model="$root.cfg.visual.theme">
|
<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="default.less">{{$root.getLz('settings.option.visual.theme.default')}}</option>
|
||||||
<option value="dark.less">{{$root.getLz('settings.option.visual.theme.dark')}}</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>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue