From 29a503a0eb1ffd8da363bdfc3ecc1fc21c7a0a30 Mon Sep 17 00:00:00 2001 From: Black Coffee Date: Tue, 25 Oct 2022 11:28:49 +0100 Subject: [PATCH] Remove theme settings on satspay invoice page and default to blue theme to allow users to skin satspay invoice page more easily --- .../satspay/templates/satspay/display.html | 9 +++++++++ lnbits/static/scss/base.scss | 20 +++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/lnbits/extensions/satspay/templates/satspay/display.html b/lnbits/extensions/satspay/templates/satspay/display.html index 42178075..6d34a386 100644 --- a/lnbits/extensions/satspay/templates/satspay/display.html +++ b/lnbits/extensions/satspay/templates/satspay/display.html @@ -303,6 +303,11 @@ rel="stylesheet" type="text/css" /> + {% endblock %} {% block scripts %} @@ -456,6 +461,10 @@ created: async function () { await this.getCustomCss() if (this.charge.payment_request) this.payInvoice() + // Remove a user defined theme + document.body.setAttribute('data-theme', '') + + if (this.charge.lnbitswallet) this.payInvoice() else this.payOnchain() await this.checkBalances() diff --git a/lnbits/static/scss/base.scss b/lnbits/static/scss/base.scss index 672a85b6..c8951fcd 100644 --- a/lnbits/static/scss/base.scss +++ b/lnbits/static/scss/base.scss @@ -7,7 +7,7 @@ $colors in $themes { [data-theme='#{$theme}'] .q-drawer--dark, body[data-theme='#{$theme}'].body--dark, [data-theme='#{$theme}'] .q-menu--dark { - background: $color !important; + background: $color; } /* IF WANTING TO SET A DARKER BG COLOR IN THE FUTURE // set a darker body bg for all themes, when in "dark mode" @@ -19,7 +19,7 @@ $colors in $themes { @if $name=='info' { [data-theme='#{$theme}'] .q-card--dark, [data-theme='#{$theme}'] .q-stepper--dark { - background: $color !important; + background: $color; } } } @@ -27,37 +27,37 @@ $colors in $themes { @each $name, $color in $colors { .bg-#{$name} { - background: $color !important; + background: $color; } .text-#{$name} { - color: $color !important; + color: $color; } } } } [data-theme='freedom'] .q-drawer--dark { - background: #0a0a0a !important; + background: #0a0a0a; } [data-theme='freedom'] .q-header { - background: #0a0a0a !important; + background: #0a0a0a; } [data-theme='salvador'] .q-drawer--dark { - background: #242424 !important; + background: #242424; } [data-theme='salvador'] .q-header { - background: #0f47af !important; + background: #0f47af; } [data-theme='flamingo'] .q-drawer--dark { - background: #e75480 !important; + background: #e75480; } [data-theme='flamingo'] .q-header { - background: #e75480 !important; + background: #e75480; } [v-cloak] {