fix: editorVault→state.editorVault + openFile import — bouton sauvegarde éditeur
All checks were successful
CI / lint (push) Successful in 17s
CI / security (push) Successful in 8s
CI / test (push) Successful in 18s
CI / build (push) Successful in 3s

This commit is contained in:
Bruno Charest 2026-05-29 21:01:30 -04:00
parent ea74907098
commit ac3fa10310

View File

@ -1,5 +1,6 @@
import { state } from './state.js'; import { state } from './state.js';
import { api } from './auth.js'; import { api } from './auth.js';
import { openFile } from './viewer.js';
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// File extension → Lucide icon mapping // File extension → Lucide icon mapping
@ -424,7 +425,7 @@ async function saveFile() {
setTimeout(() => { setTimeout(() => {
closeEditor(); closeEditor();
if (state.currentVault === editorVault && state.currentPath === state.editorPath) { if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) {
openFile(state.currentVault, state.currentPath); openFile(state.currentVault, state.currentPath);
} }
}, 800); }, 800);
@ -438,7 +439,7 @@ async function saveFile() {
} }
async function deleteFile() { async function deleteFile() {
if (!editorVault || !state.editorPath) return; if (!state.editorVault || !state.editorPath) return;
const deleteBtn = document.getElementById("editor-delete"); const deleteBtn = document.getElementById("editor-delete");
const originalHTML = deleteBtn.innerHTML; const originalHTML = deleteBtn.innerHTML;