fix: reload loop in /upgrades/ routes + error status_code (#3645)
This commit is contained in:
parent
327b9d7f63
commit
3761f7922c
3 changed files with 7 additions and 3 deletions
|
|
@ -68,6 +68,7 @@ def template_renderer(additional_folders: list | None = None) -> Jinja2Templates
|
|||
folders.extend(additional_folders)
|
||||
t = Jinja2Templates(loader=jinja2.FileSystemLoader(folders))
|
||||
t.env.globals["static_url_for"] = static_url_for
|
||||
t.env.globals["normalize_path"] = normalize_path
|
||||
|
||||
window_settings = {
|
||||
"AD_SPACE": settings.lnbits_ad_space,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
v-if="g.user && !g.isPublicPage"
|
||||
></lnbits-header-wallets>
|
||||
<!-- block page content from static extensions -->
|
||||
<div v-if="$route.path === '{{ request.path }}'">
|
||||
<div v-if="$route.path === '{{ normalize_path(request.path) }}/'">
|
||||
{% block page %}{% endblock %}
|
||||
</div>
|
||||
<!-- vue router-view -->
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
</q-layout>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
const RENDERED_ROUTE = '{{ request.path }}'
|
||||
const RENDERED_ROUTE = '{{ normalize_path(request.path) }}/'
|
||||
const WINDOW_SETTINGS = {{ WINDOW_SETTINGS | tojson }}
|
||||
Object.keys(WINDOW_SETTINGS).forEach(key => {
|
||||
window[key] = WINDOW_SETTINGS[key]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{% extends "public.html" %} {% from "macros.jinja" import window_vars with
|
||||
context %} {% block scripts %} {{ window_vars() }} {% endblock %} {% block
|
||||
page_container %}
|
||||
<lnbits-error code="{{ status_code }}" message="{{ message }}"></lnbits-error>
|
||||
<lnbits-error
|
||||
code="{{ status_code | safe }}"
|
||||
message="{{ message | safe }}"
|
||||
></lnbits-error>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue