fix: extension builder did not show the content (#3648)
This commit is contained in:
parent
77a5d7fe50
commit
5a5f253fa5
3 changed files with 9 additions and 4 deletions
2
lnbits/static/bundle-components.min.js
vendored
2
lnbits/static/bundle-components.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -35,7 +35,10 @@ const DynamicComponent = {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
if (RENDERED_ROUTE !== this.$route.fullPath) {
|
let route = RENDERED_ROUTE
|
||||||
|
// append trailing slash only on the root path `/path` -> `/path/`
|
||||||
|
if (route.split('/').length === 2) route += '/'
|
||||||
|
if (route !== this.$route.fullPath) {
|
||||||
console.log('Redirecting to non-vue route:', this.$route.fullPath)
|
console.log('Redirecting to non-vue route:', this.$route.fullPath)
|
||||||
window.location = this.$route.fullPath
|
window.location = this.$route.fullPath
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@
|
||||||
v-if="g.user && !g.isPublicPage"
|
v-if="g.user && !g.isPublicPage"
|
||||||
></lnbits-header-wallets>
|
></lnbits-header-wallets>
|
||||||
<!-- block page content from static extensions -->
|
<!-- block page content from static extensions -->
|
||||||
<div v-if="$route.path === '{{ normalize_path(request.path) }}/'">
|
<div
|
||||||
|
v-if="$route.path.startsWith('{{ normalize_path(request.path) }}')"
|
||||||
|
>
|
||||||
{% block page %}{% endblock %}
|
{% block page %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<!-- vue router-view -->
|
<!-- vue router-view -->
|
||||||
|
|
@ -67,7 +69,7 @@
|
||||||
</q-layout>
|
</q-layout>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const RENDERED_ROUTE = '{{ normalize_path(request.path) }}/'
|
const RENDERED_ROUTE = '{{ normalize_path(request.path) }}'
|
||||||
const WINDOW_SETTINGS = {{ WINDOW_SETTINGS | tojson }}
|
const WINDOW_SETTINGS = {{ WINDOW_SETTINGS | tojson }}
|
||||||
Object.keys(WINDOW_SETTINGS).forEach(key => {
|
Object.keys(WINDOW_SETTINGS).forEach(key => {
|
||||||
window[key] = WINDOW_SETTINGS[key]
|
window[key] = WINDOW_SETTINGS[key]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue