added themes dropdown to explore page

This commit is contained in:
booploops 2022-02-22 19:26:09 -08:00
parent 2fa75f28c2
commit 6e49c46d46

View file

@ -5,6 +5,13 @@
<div class="col nopadding"> <div class="col nopadding">
<h1 class="header-text">{{$root.getLz('settings.header.visual.theme.github.page')}}</h1> <h1 class="header-text">{{$root.getLz('settings.header.visual.theme.github.page')}}</h1>
</div> </div>
<div class="col-auto flex-center">
<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.file">{{ theme.name }}</option>
</select>
</div>
<div class="col-auto nopadding flex-center"> <div class="col-auto nopadding flex-center">
<button class="md-btn md-btn-small md-btn-block" @click="installThemeURL()"> <button class="md-btn md-btn-small md-btn-block" @click="installThemeURL()">
{{$root.getLz('settings.option.visual.theme.github.download')}} {{$root.getLz('settings.option.visual.theme.github.download')}}
@ -27,7 +34,6 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<span v-if="themesInstalled.includes(repo.full_name)" class="codicon codicon-cloud-download"></span> <span v-if="themesInstalled.includes(repo.full_name)" class="codicon codicon-cloud-download"></span>
</div> </div>
</div> </div>
</li> </li>
@ -83,10 +89,12 @@
}, },
readme: "" readme: ""
}, },
themesInstalled: [] themesInstalled: [],
themes: []
} }
}, },
mounted() { mounted() {
this.themes = ipcRenderer.sendSync("get-themes")
this.getRepos(); this.getRepos();
this.getInstalledThemes(); this.getInstalledThemes();
}, },