fix: header Forge — affiche Forge + titre/fichier, restaure ObsiGate a la fermeture
This commit is contained in:
@@ -581,6 +581,9 @@ export function init() {
|
|||||||
var forgeFrame = document.getElementById('forge-iframe');
|
var forgeFrame = document.getElementById('forge-iframe');
|
||||||
if (forgeFrame) forgeFrame.remove();
|
if (forgeFrame) forgeFrame.remove();
|
||||||
if (modal) modal.classList.remove('active');
|
if (modal) modal.classList.remove('active');
|
||||||
|
// Restore brand text
|
||||||
|
var brand = modal.querySelector('.editor-brand');
|
||||||
|
if (brand) brand.textContent = 'ObsiGate';
|
||||||
// Restore header/footer
|
// Restore header/footer
|
||||||
var headerEl = modal.querySelector('.editor-header');
|
var headerEl = modal.querySelector('.editor-header');
|
||||||
var footerEl = modal.querySelector('.editor-footer');
|
var footerEl = modal.querySelector('.editor-footer');
|
||||||
|
|||||||
@@ -471,6 +471,9 @@ function closeEditor() {
|
|||||||
const path = state.editorPath;
|
const path = state.editorPath;
|
||||||
const modal = document.getElementById("editor-modal");
|
const modal = document.getElementById("editor-modal");
|
||||||
modal.classList.remove("active");
|
modal.classList.remove("active");
|
||||||
|
// Restore brand text
|
||||||
|
var brand = modal.querySelector('.editor-brand');
|
||||||
|
if (brand) brand.textContent = 'ObsiGate';
|
||||||
if (state.editorView) {
|
if (state.editorView) {
|
||||||
state.editorView.destroy();
|
state.editorView.destroy();
|
||||||
state.editorView = null;
|
state.editorView = null;
|
||||||
|
|||||||
@@ -529,6 +529,13 @@ export function renderFile(data) {
|
|||||||
// Set editor state so parent buttons work
|
// Set editor state so parent buttons work
|
||||||
state.editorVault = data.vault;
|
state.editorVault = data.vault;
|
||||||
state.editorPath = data.path;
|
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.innerHTML = "";
|
||||||
bodyEl.style.overflow = "hidden";
|
bodyEl.style.overflow = "hidden";
|
||||||
var iframe = document.createElement("iframe");
|
var iframe = document.createElement("iframe");
|
||||||
|
|||||||
Reference in New Issue
Block a user