mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-26 15:42:30 +01:00
Merge branch 'main' into diagon-alley
This commit is contained in:
commit
769b966806
4 changed files with 34 additions and 7 deletions
|
@ -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])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,14 @@ $themes: (
|
||||||
marginal-bg: #1f2234,
|
marginal-bg: #1f2234,
|
||||||
marginal-text: #fff
|
marginal-text: #fff
|
||||||
),
|
),
|
||||||
|
'bitcoin': (
|
||||||
|
primary: #ff9853,
|
||||||
|
secondary: #ff7353,
|
||||||
|
dark: #2d293b,
|
||||||
|
info: #333646,
|
||||||
|
marginal-bg: #2d293b,
|
||||||
|
marginal-text: #fff
|
||||||
|
),
|
||||||
'mint': (
|
'mint': (
|
||||||
primary: #3ab77d,
|
primary: #3ab77d,
|
||||||
secondary: #27b065,
|
secondary: #27b065,
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -67,8 +67,19 @@
|
||||||
icon="format_color_fill"
|
icon="format_color_fill"
|
||||||
color="deep-purple"
|
color="deep-purple"
|
||||||
size="md"
|
size="md"
|
||||||
><q-tooltip>classic</q-tooltip> </q-btn
|
><q-tooltip>classic</q-tooltip>
|
||||||
><q-btn
|
</q-btn>
|
||||||
|
<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
|
||||||
v-if="g.allowedThemes.includes('mint')"
|
v-if="g.allowedThemes.includes('mint')"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
|
|
Loading…
Add table
Reference in a new issue