diff --git a/.env.example b/.env.example index 8f8125192..335230856 100644 --- a/.env.example +++ b/.env.example @@ -30,7 +30,7 @@ LNBITS_SITE_TITLE="LNbits" LNBITS_SITE_TAGLINE="free and open-source lightning wallet" LNBITS_SITE_DESCRIPTION="Some description about your service, will display if title is not 'LNbits'" # 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), # LndRestWallet, CLightningWallet, LNbitsWallet, SparkWallet, FakeWallet diff --git a/lnbits/static/js/base.js b/lnbits/static/js/base.js index d49eec16f..c8863b5ab 100644 --- a/lnbits/static/js/base.js +++ b/lnbits/static/js/base.js @@ -345,17 +345,25 @@ window.windowMixin = { } }, 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 + if (!this.$q.localStorage.getItem('lnbits.theme')){ + this.changeColor(this.g.allowedThemes[0]) + } if ( this.$q.localStorage.getItem('lnbits.theme') && !this.g.allowedThemes.includes( this.$q.localStorage.getItem('lnbits.theme') ) ) { - console.log('allowedThemes changed by Admin', this.g.allowedThemes[0]) this.changeColor(this.g.allowedThemes[0]) } diff --git a/lnbits/static/scss/base.scss b/lnbits/static/scss/base.scss index 32718f79e..afafd50d1 100644 --- a/lnbits/static/scss/base.scss +++ b/lnbits/static/scss/base.scss @@ -7,6 +7,14 @@ $themes: ( marginal-bg: #1f2234, marginal-text: #fff ), + 'bitcoin': ( + primary: #ff9853, + secondary: #ff7353, + dark: #2d293b, + info: #333646, + marginal-bg: #2d293b, + marginal-text: #fff + ), 'mint': ( primary: #3ab77d, secondary: #27b065, diff --git a/lnbits/templates/base.html b/lnbits/templates/base.html index 9ec1e2e39..965d5336e 100644 --- a/lnbits/templates/base.html +++ b/lnbits/templates/base.html @@ -20,7 +20,7 @@ {% block head_scripts %}{% endblock %} - + @@ -67,8 +67,19 @@ icon="format_color_fill" color="deep-purple" size="md" - >classic classic + + bitcoin + +