Fixed themes, added bitcoin theme
This commit is contained in:
parent
c626e12fa3
commit
e9065833c0
|
@ -30,7 +30,7 @@ LNBITS_SITE_TITLE="LNbits"
|
||||||
LNBITS_SITE_TAGLINE="free and open-source lightning wallet"
|
LNBITS_SITE_TAGLINE="free and open-source lightning wallet"
|
||||||
LNBITS_SITE_DESCRIPTION="Some description about your service, will display if title is not 'LNbits'"
|
LNBITS_SITE_DESCRIPTION="Some description about your service, will display if title is not 'LNbits'"
|
||||||
# Choose from mint, flamingo, salvador, autumn, monochrome, classic
|
# Choose from mint, flamingo, salvador, autumn, monochrome, classic
|
||||||
LNBITS_THEME_OPTIONS="mint, flamingo, classic, autumn, monochrome, salvador"
|
LNBITS_THEME_OPTIONS="classic, bitcoin, flamingo, mint, autumn, monochrome, salvador"
|
||||||
|
|
||||||
# Choose from LNPayWallet, OpenNodeWallet, LntxbotWallet, LndWallet (gRPC),
|
# Choose from LNPayWallet, OpenNodeWallet, LntxbotWallet, LndWallet (gRPC),
|
||||||
# LndRestWallet, CLightningWallet, LNbitsWallet, SparkWallet, FakeWallet
|
# LndRestWallet, CLightningWallet, LNbitsWallet, SparkWallet, FakeWallet
|
||||||
|
|
|
@ -345,17 +345,25 @@ window.windowMixin = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode'))
|
|
||||||
this.g.allowedThemes = window.allowedThemes ?? ['classic']
|
if(this.$q.localStorage.getItem('lnbits.darkMode') == true || this.$q.localStorage.getItem('lnbits.darkMode') == false){
|
||||||
|
this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode'))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.$q.dark.set(true)
|
||||||
|
}
|
||||||
|
this.g.allowedThemes = window.allowedThemes ?? ['bitcoin']
|
||||||
|
|
||||||
// failsafe if admin changes themes halfway
|
// failsafe if admin changes themes halfway
|
||||||
|
if (!this.$q.localStorage.getItem('lnbits.theme')){
|
||||||
|
this.changeColor(this.g.allowedThemes[0])
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
this.$q.localStorage.getItem('lnbits.theme') &&
|
this.$q.localStorage.getItem('lnbits.theme') &&
|
||||||
!this.g.allowedThemes.includes(
|
!this.g.allowedThemes.includes(
|
||||||
this.$q.localStorage.getItem('lnbits.theme')
|
this.$q.localStorage.getItem('lnbits.theme')
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
console.log('allowedThemes changed by Admin', this.g.allowedThemes[0])
|
|
||||||
this.changeColor(this.g.allowedThemes[0])
|
this.changeColor(this.g.allowedThemes[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
$themes: (
|
$themes: (
|
||||||
|
'bitcoin': (
|
||||||
|
primary: #ff9853,
|
||||||
|
secondary: #ff7353,
|
||||||
|
dark: #2d293b,
|
||||||
|
info: #333646,
|
||||||
|
marginal-bg: #2d293b,
|
||||||
|
marginal-text: #fff
|
||||||
|
),
|
||||||
'classic': (
|
'classic': (
|
||||||
primary: #673ab7,
|
primary: #673ab7,
|
||||||
secondary: #9c27b0,
|
secondary: #9c27b0,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{% block head_scripts %}{% endblock %}
|
{% block head_scripts %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body data-theme="classic">
|
<body data-theme="bitcoin">
|
||||||
<q-layout id="vue" view="hHh lpR lfr" v-cloak>
|
<q-layout id="vue" view="hHh lpR lfr" v-cloak>
|
||||||
<q-header bordered class="bg-marginal-bg">
|
<q-header bordered class="bg-marginal-bg">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
|
@ -59,6 +59,16 @@
|
||||||
class="q-pl-md"
|
class="q-pl-md"
|
||||||
>
|
>
|
||||||
<div class="row no-wrap q-pa-md">
|
<div class="row no-wrap q-pa-md">
|
||||||
|
<q-btn
|
||||||
|
v-if="g.allowedThemes.includes('bitcoin')"
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
@click="changeColor('bitcoin')"
|
||||||
|
icon="format_color_fill"
|
||||||
|
color="orange"
|
||||||
|
size="md"
|
||||||
|
><q-tooltip>bitcoin</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="g.allowedThemes.includes('classic')"
|
v-if="g.allowedThemes.includes('classic')"
|
||||||
dense
|
dense
|
||||||
|
|
Loading…
Reference in New Issue
Block a user