From 33650cc43222feb0328dd3bdbefaaca0696bc7b4 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Wed, 5 Feb 2025 15:11:48 +0200 Subject: [PATCH] when the path is render/hash do not save path for nav history --- src/main/resources/q-apps/q-apps.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/q-apps/q-apps.js b/src/main/resources/q-apps/q-apps.js index 25656370..5df8765c 100644 --- a/src/main/resources/q-apps/q-apps.js +++ b/src/main/resources/q-apps/q-apps.js @@ -84,6 +84,7 @@ isDOMContentLoaded: isDOMContentLoaded ? true : false function handleQDNResourceDisplayed(pathurl, isDOMContentLoaded) { // make sure that an empty string the root path +if(pathurl?.startsWith('/render/hash/')) return; const path = pathurl || '/' if (!isManualNavigation) { isManualNavigation = true @@ -284,8 +285,6 @@ window.addEventListener("message", async (event) => { return; } - console.log("Core received action: " + JSON.stringify(event.data.action)); - let url; let data = event.data; @@ -694,6 +693,7 @@ const qortalRequestWithTimeout = (request, timeout) => * Send current page details to UI */ document.addEventListener('DOMContentLoaded', (event) => { + resetVariables() qortalRequest({ action: "QDN_RESOURCE_DISPLAYED", @@ -712,6 +712,8 @@ resetVariables() * Handle app navigation */ navigation.addEventListener('navigate', (event) => { + console.log('navigate', event) + const url = new URL(event.destination.url); let fullpath = url.pathname + url.hash;