feat: added home button on error page (#2330)

* Added redirect on error page if user id not present as users keep getting stuck
This commit is contained in:
Arc 2024-03-21 11:24:38 +00:00 committed by GitHub
parent 8dcb53aea0
commit d208e68885
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 12 deletions

View file

@ -1,6 +1,6 @@
// update cache version every time there is a new deployment // update cache version every time there is a new deployment
// so the service worker reinitializes the cache // so the service worker reinitializes the cache
const CACHE_VERSION = 122 const CACHE_VERSION = 123
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-` const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => { const getApiKey = request => {

View file

@ -13,18 +13,28 @@
></q-icon> ></q-icon>
<h5 class="q-my-none">{{ err }}</h5> <h5 class="q-my-none">{{ err }}</h5>
<h4>
If you believe this shouldn't be an error please bring it up on
https://t.me/lnbits
</h4>
<br /> <br />
<div class="row">
<div class="col">
<q-btn <q-btn
@click="goBack" @click="goBack"
color="grey" color="grey"
outline outline
label="Back" label="Back"
class="full-width" style="width: 100%"
></q-btn> ></q-btn>
</div>
<div class="col">
<q-btn
@click="goHome"
color="grey"
outline
label="Home"
style="width: 100%"
></q-btn>
</div>
</div>
</center> </center>
</q-card-section> </q-card-section>
</q-card> </q-card>
@ -42,6 +52,9 @@
methods: { methods: {
goBack: function () { goBack: function () {
window.history.back() window.history.back()
},
goHome: function () {
window.location.href = '/'
} }
} }
}) })