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 { 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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user