From 3b142e9dba3fd9d45b365009aadda157e4ebe3d7 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Wed, 7 Jan 2026 14:58:05 -0600 Subject: [PATCH] feat(docs): add selectedReticulumPath state and update localDocsUrl logic for reticulum documentation handling --- meshchatx/src/frontend/components/docs/DocsPage.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/meshchatx/src/frontend/components/docs/DocsPage.vue b/meshchatx/src/frontend/components/docs/DocsPage.vue index 9da4ecb..ae9b1d8 100644 --- a/meshchatx/src/frontend/components/docs/DocsPage.vue +++ b/meshchatx/src/frontend/components/docs/DocsPage.vue @@ -571,6 +571,7 @@ export default { meshchatxDocs: [], selectedDocPath: null, selectedDocContent: null, + selectedReticulumPath: null, alternateDocsUrl: "", languages: { en: "English", @@ -591,6 +592,9 @@ export default { return this.$i18n.locale; }, localDocsUrl() { + if (this.selectedReticulumPath) { + return `/reticulum-docs/${this.selectedReticulumPath}`; + } const lang = this.currentLang; if (lang === "en") return "/reticulum-docs/index.html"; if (Object.keys(this.languages).includes(lang)) { @@ -698,10 +702,11 @@ export default { try { await window.axios.post("/api/v1/docs/switch", { version }); this.showVersions = false; + this.selectedReticulumPath = null; this.fetchStatus(); // reload iframe if in reticulum tab if (this.activeTab === "reticulum") { - const iframe = this.$refs.docsIframe; + const iframe = this.$refs.docsFrame; if (iframe) { iframe.contentWindow.location.reload(); } @@ -752,6 +757,7 @@ export default { async setLanguage(langCode) { try { this.showLanguages = false; + this.selectedReticulumPath = null; await window.axios.patch("/api/v1/config", { language: langCode, }); @@ -799,10 +805,7 @@ export default { } else { this.activeTab = "reticulum"; const cleanPath = path.replace("/reticulum-docs/", ""); - const iframe = this.$refs.docsFrame; - if (iframe) { - iframe.src = `/reticulum-docs/${cleanPath}`; - } + this.selectedReticulumPath = cleanPath; } this.clearSearch(); },