small fix for theme picking/seting

This commit is contained in:
Tiago vasconcelos
2021-07-01 11:54:45 +01:00
parent 87d12634f7
commit 4493e93890
4 changed files with 25 additions and 10 deletions
+3 -2
View File
@@ -48,7 +48,7 @@
</q-badge>
{% endblock %}
<q-btn-dropdown
v-if="g.allowedThemes"
v-if="g.allowedThemes && g.allowedThemes.length > 1"
dense
flat
round
@@ -58,6 +58,7 @@
>
<div class="row no-wrap q-pa-md">
<q-btn
v-if="g.allowedThemes.includes('classic')"
dense
flat
@click="changeColor('classic')"
@@ -188,7 +189,7 @@
<script type="text/javascript">
const themes = {{ LNBITS_THEME_OPTIONS | tojson }}
if(themes && themes.length) {
window.allowedThemes = themes.trim()
window.allowedThemes = themes.map(str => str.trim())
}
</script>
{% block scripts %}{% endblock %}