fix: editorVault→state.editorVault + openFile import — bouton sauvegarde éditeur
This commit is contained in:
parent
ea74907098
commit
ac3fa10310
@ -1,5 +1,6 @@
|
||||
import { state } from './state.js';
|
||||
import { api } from './auth.js';
|
||||
import { openFile } from './viewer.js';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// File extension → Lucide icon mapping
|
||||
@ -424,7 +425,7 @@ async function saveFile() {
|
||||
|
||||
setTimeout(() => {
|
||||
closeEditor();
|
||||
if (state.currentVault === editorVault && state.currentPath === state.editorPath) {
|
||||
if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) {
|
||||
openFile(state.currentVault, state.currentPath);
|
||||
}
|
||||
}, 800);
|
||||
@ -438,7 +439,7 @@ async function saveFile() {
|
||||
}
|
||||
|
||||
async function deleteFile() {
|
||||
if (!editorVault || !state.editorPath) return;
|
||||
if (!state.editorVault || !state.editorPath) return;
|
||||
|
||||
const deleteBtn = document.getElementById("editor-delete");
|
||||
const originalHTML = deleteBtn.innerHTML;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user