update directory live
This commit is contained in:
@@ -2,6 +2,15 @@ import { contextBridge, ipcRenderer } from "electron";
|
||||
const api = {
|
||||
openNoteWindow: (noteId) => {
|
||||
ipcRenderer.send("open-note-window", noteId);
|
||||
},
|
||||
onNoteCreated: (callback) => {
|
||||
ipcRenderer.on("note-created", (_, data) => callback(data));
|
||||
},
|
||||
onNoteUpdated: (callback) => {
|
||||
ipcRenderer.on("note-updated", (_, data) => callback(data));
|
||||
},
|
||||
onNoteDeleted: (callback) => {
|
||||
ipcRenderer.on("note-deleted", (_, data) => callback(data));
|
||||
}
|
||||
};
|
||||
const notesAPI = {
|
||||
|
||||
Reference in New Issue
Block a user