Bug fix
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 53s

This commit is contained in:
2026-10-11 22:38:59 +02:00
parent 1402045001
commit 1fab8ce20d
7 changed files with 32 additions and 8 deletions

View File

@@ -26,7 +26,9 @@ function markDirty() {
}
function closeNote(){
emitter.emit('delete-note', props.noteKey);
// 'close-note' only closes the opened note; 'delete-note' is reserved for
// actual deletions (sidebar removal happens on that event instead)
emitter.emit('close-note', props.noteKey);
}
const compiledMarkdown = computed(() => {

View File

@@ -47,6 +47,7 @@ function handleDeleteNote(key) {
// Moure aixo
onMounted(() => {
emitter.on("push-note", handlePushNote);
emitter.on("close-note", handleDeleteNote);
emitter.on("delete-note", handleDeleteNote);
emitter.on("title-updated", handleTitleUpdated);
});
@@ -60,6 +61,7 @@ function handleTitleUpdated(data) {
onUnmounted(() => {
emitter.off("push-note", handlePushNote);
emitter.off("close-note", handleDeleteNote);
emitter.off("delete-note", handleDeleteNote);
emitter.off("title-updated", handleTitleUpdated);
});