add lnbits version to frontend (#1677)

This commit is contained in:
dni ⚡ 2023-05-04 17:21:37 +02:00 committed by GitHub
parent 590b52cb31
commit 7feac3bb5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View file

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

View file

@ -49,7 +49,8 @@ def template_renderer(additional_folders: Optional[List] = None) -> Jinja2Templa
t.env.globals["SITE_TAGLINE"] = settings.lnbits_site_tagline
t.env.globals["SITE_DESCRIPTION"] = settings.lnbits_site_description
t.env.globals["LNBITS_THEME_OPTIONS"] = settings.lnbits_theme_options
t.env.globals["LNBITS_VERSION"] = settings.lnbits_commit
t.env.globals["COMMIT_VERSION"] = settings.lnbits_commit
t.env.globals["LNBITS_VERSION"] = settings.version
t.env.globals["LNBITS_ADMIN_UI"] = settings.lnbits_admin_ui
t.env.globals["EXTENSIONS"] = [
e

File diff suppressed because one or more lines are too long

View file

@ -37,6 +37,7 @@ window.localisation.en = {
view_swagger_docs: 'View LNbits Swagger API docs',
api_docs: 'Api docs',
commit_version: 'Commit version',
lnbits_version: 'LNbits version',
runs_on: 'Runs on',
credit_hint: 'Press Enter to credit account',
credit_label: '%{denomination} to credit',

View file

@ -240,10 +240,13 @@
<q-toolbar-title class="text-caption">
{{ SITE_TITLE }}, {{SITE_TAGLINE}}
<br />
<small v-if="'{{SITE_TITLE}}' == 'LNbits'"
<small
>{% raw %}{{ $t('lnbits_version') }}{% endraw %}:
{{LNBITS_VERSION}},
</small>
<small
>{% raw %}{{ $t('commit_version') }}{% endraw %}:
{{LNBITS_VERSION}}</small
{{COMMIT_VERSION}}</small
>
</q-toolbar-title>
<q-space></q-space>