Point to another Mempool
{{ this.mempool.endpoint }}
@@ -143,7 +143,7 @@
- Quick vouchers
- Advanced withdraw link(s)
@@ -197,7 +194,7 @@
@@ -216,14 +213,14 @@
Update withdraw link
diff --git a/lnbits/settings.py b/lnbits/settings.py
index b42d06ec..8ce0ff3b 100644
--- a/lnbits/settings.py
+++ b/lnbits/settings.py
@@ -29,7 +29,9 @@ LNBITS_ALLOWED_USERS: List[str] = env.list(
LNBITS_DISABLED_EXTENSIONS: List[str] = env.list(
"LNBITS_DISABLED_EXTENSIONS", default=[], subcast=str
)
+
LNBITS_SITE_TITLE = env.str("LNBITS_SITE_TITLE", default="LNbits")
+LNBITS_THEME_OPTIONS = env.str("LNBITS_THEME_OPTIONS", default="classic,green,orange")
WALLET = wallet_class()
DEFAULT_WALLET_NAME = env.str("LNBITS_DEFAULT_WALLET_NAME", default="LNbits wallet")
diff --git a/lnbits/static/js/base.js b/lnbits/static/js/base.js
index cebd5cfc..ca30dfef 100644
--- a/lnbits/static/js/base.js
+++ b/lnbits/static/js/base.js
@@ -311,7 +311,14 @@ window.windowMixin = {
}
}
},
+
methods: {
+ changeColor: function (newValue) {
+ document.body.setAttribute('data-theme', newValue)
+ console.log(document.body.getAttribute('data-theme'))
+ console.log(newValue)
+ this.$q.localStorage.set('lnbits.theme', newValue)
+ },
toggleDarkMode: function () {
this.$q.dark.toggle()
this.$q.localStorage.set('lnbits.darkMode', this.$q.dark.isActive)
@@ -328,6 +335,12 @@ window.windowMixin = {
},
created: function () {
this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode'))
+ if (this.$q.localStorage.getItem('lnbits.theme')) {
+ document.body.setAttribute(
+ 'data-theme',
+ this.$q.localStorage.getItem('lnbits.theme')
+ )
+ }
if (window.user) {
this.g.user = Object.freeze(window.LNbits.map.user(window.user))
}
diff --git a/lnbits/static/js/components.js b/lnbits/static/js/components.js
index e1faf2fe..0845b555 100644
--- a/lnbits/static/js/components.js
+++ b/lnbits/static/js/components.js
@@ -35,7 +35,7 @@ Vue.component('lnbits-wallet-list', {
@@ -118,7 +118,7 @@ Vue.component('lnbits-extension-list', {
@@ -219,7 +219,7 @@ Vue.component('lnbits-payment-details', {
-
+
extra
{{ entry.key }} :
diff --git a/lnbits/static/scss/base.scss b/lnbits/static/scss/base.scss
index 2af63bab..3766d164 100644
--- a/lnbits/static/scss/base.scss
+++ b/lnbits/static/scss/base.scss
@@ -1,34 +1,86 @@
-$dark-background: #1f2234;
-$dark-card-background: #333646;
+$themes: (
+ 'classic': (
+ primary: #673ab7,
+ secondary: #9c27b0,
+ dark: #1f2234,
+ info: #333646,
+ marginal-bg: #1f2234,
+ marginal-text: #fff
+ ),
+ 'mint': (
+ primary: #3ab77d,
+ secondary: #27b065,
+ dark: #1f342b,
+ info: #334642,
+ marginal-bg: #1f342b,
+ marginal-text: #fff
+ ),
+ 'autumn': (
+ primary: #b7763a,
+ secondary: #b07927,
+ dark: #34291f,
+ info: #463f33,
+ marginal-bg: #342a1f,
+ marginal-text: rgb(255, 255, 255)
+ ),
+ 'flamingo': (
+ primary: #d11d53,
+ secondary: #db3e6d,
+ dark: #e75480,
+ info: #ec7599,
+ marginal-bg: #e75480,
+ marginal-text: rgb(255, 255, 255)
+ ),
+ 'monochrome': (
+ primary: #494949,
+ secondary: #6b6b6b,
+ dark: #000,
+ info: rgb(39, 39, 39),
+ marginal-bg: #000,
+ marginal-text: rgb(255, 255, 255)
+ )
+);
+[data-theme='quasar'] .q-drawer--dark {
+ background: #121212 !important;
+}
+
+@each $theme, $colors in $themes {
+ @each $name, $color in $colors {
+ @if $name == 'dark' {
+ [data-theme='#{$theme}'] .q-drawer--dark,
+ body[data-theme='#{$theme}'].body--dark,
+ [data-theme='#{$theme}'] .q-menu--dark {
+ background: $color !important;
+ }
+ }
+ @if $name == 'info' {
+ [data-theme='#{$theme}'] .q-card--dark,
+ [data-theme='#{$theme}'] .q-stepper--dark {
+ background: $color !important;
+ }
+ }
+ }
+ [data-theme='#{$theme}'] {
+ @each $name, $color in $colors {
+ .bg-#{$name} {
+ background: $color !important;
+ }
+ .text-#{$name} {
+ color: $color !important;
+ }
+ }
+ }
+}
[v-cloak] {
display: none;
}
-.bg-lnbits-dark {
- background-color: $dark-background;
-}
-
-body.body--dark,
-body.body--dark .q-drawer--dark,
-body.body--dark .q-menu--dark {
- background: $dark-background;
-}
-
-body.body--dark .q-card--dark {
- background: $dark-card-background;
-}
-
body.body--dark .q-table--dark {
background: transparent;
}
-body.body--light,
-body.body--light .q-drawer {
- background: whitesmoke;
-}
-
body.body--dark .q-field--error {
.text-negative,
.q-field__messages {
diff --git a/lnbits/templates/base.html b/lnbits/templates/base.html
index 1e39b608..78bbd5d5 100644
--- a/lnbits/templates/base.html
+++ b/lnbits/templates/base.html
@@ -7,6 +7,7 @@
{% endfor %}
+
{% block styles %}{% endblock %}
{% block title %}{{ SITE_TITLE }}{% endblock %}
@@ -19,9 +20,9 @@
{% block head_scripts %}{% endblock %}
-
-
-
+
+
+
{% block drawer_toggle %}
{% endblock %}
+
+
+ classic mint autumn
+
+ flamingo
+
+ monochrome
+
+ quasar
+
+
+
+
Toggle Dark Mode
@@ -93,7 +157,7 @@