Moved injection out of constructor; refactored nedton-editor component and saveAs logic

This commit is contained in:
2025-06-20 23:52:22 -05:00
parent 4193d46d0d
commit 598a66f517
11 changed files with 195 additions and 168 deletions

View File

@@ -18,7 +18,7 @@ contextBridge.exposeInMainWorld('fs', {
getFileContents: (path) => ipcRenderer.invoke("getFileContents", path),
openFiles: (startPath) => ipcRenderer.invoke("openFiles", startPath),
saveFile: (path, content) => ipcRenderer.invoke("saveFile", path, content),
saveFileAs: (content) => ipcRenderer.invoke("saveFileAs", content),
saveFileAs: () => ipcRenderer.invoke("saveFileAs"),
closeFile: (path) => ipcRenderer.invoke("closeFile", path),
getPathForFile: (file) => webUtils.getPathForFile(file),
onLoadFiles: (callback) => ipcRenderer.on('load-files', (_event, paths) => callback(paths)),