From 36c15460987c4b7c9c6a71d3da1ed7716084090d Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Tue, 16 Jun 2026 10:13:19 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20header=20Forge=20=E2=80=94=20affiche=20F?= =?UTF-8?q?orge=20+=20titre/fichier,=20restaure=20ObsiGate=20a=20la=20ferm?= =?UTF-8?q?eture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/sync.js | 3 +++ frontend/js/utils.js | 3 +++ frontend/js/viewer.js | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/frontend/js/sync.js b/frontend/js/sync.js index 2a7ce70..e386155 100644 --- a/frontend/js/sync.js +++ b/frontend/js/sync.js @@ -581,6 +581,9 @@ export function init() { var forgeFrame = document.getElementById('forge-iframe'); if (forgeFrame) forgeFrame.remove(); if (modal) modal.classList.remove('active'); + // Restore brand text + var brand = modal.querySelector('.editor-brand'); + if (brand) brand.textContent = 'ObsiGate'; // Restore header/footer var headerEl = modal.querySelector('.editor-header'); var footerEl = modal.querySelector('.editor-footer'); diff --git a/frontend/js/utils.js b/frontend/js/utils.js index 8b6abaa..a5fb8f0 100644 --- a/frontend/js/utils.js +++ b/frontend/js/utils.js @@ -471,6 +471,9 @@ function closeEditor() { const path = state.editorPath; const modal = document.getElementById("editor-modal"); modal.classList.remove("active"); + // Restore brand text + var brand = modal.querySelector('.editor-brand'); + if (brand) brand.textContent = 'ObsiGate'; if (state.editorView) { state.editorView.destroy(); state.editorView = null; diff --git a/frontend/js/viewer.js b/frontend/js/viewer.js index 9a7b816..cb7620e 100644 --- a/frontend/js/viewer.js +++ b/frontend/js/viewer.js @@ -529,6 +529,13 @@ export function renderFile(data) { // Set editor state so parent buttons work state.editorVault = data.vault; state.editorPath = data.path; + // Update header: show "Forge" brand + filename + var brand = modal.querySelector(".editor-brand"); + var titleInp = document.getElementById("editor-title-input"); + var fileInp = document.getElementById("editor-filename-input"); + if (brand) brand.textContent = "Forge"; + if (titleInp) { titleInp.value = data.title || ''; titleInp.placeholder = 'Titre...'; } + if (fileInp) fileInp.value = data.path.split('/').pop(); bodyEl.innerHTML = ""; bodyEl.style.overflow = "hidden"; var iframe = document.createElement("iframe");