mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(notes/server): use new alert
This commit is contained in:
1 parent
9eefc1642a
commit
92c7a352de
1 file changed
+6
-5
@@ -37,7 +37,7 @@ onNet(events.NOTE_ADD_NOTE, async (note: Note) => {
|
||||
|
||||
} catch (error) {
|
||||
const pSource = (global as any).source
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, 'NOTES_ADD_FAILED')
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_ADD_FAILED', type: 'error' })
|
||||
}
|
||||
});
|
||||
|
||||
@@ -59,11 +59,11 @@ onNet(events.NOTE_DELETE_NOTE, async (noteId: NoteId) => {
|
||||
const _identifier = await useIdentifier();
|
||||
await deleteNote(noteId.id, _identifier);
|
||||
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, 'NOTES_DELETE_SUCCESS')
|
||||
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_DELETE_SUCCESS', type: 'success' })
|
||||
|
||||
} catch (error) {
|
||||
const pSource = (global as any).source;
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, 'NOTES_DELETE_FAILED')
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_DELETE_FAILED', type: 'error' })
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,11 +73,12 @@ onNet(events.NOTE_UPDATE_NOTE, async (note: Note) => {
|
||||
const _identifier = await useIdentifier();
|
||||
await updateNote(note, _identifier);
|
||||
emitNet(events.NOTE_UPDATE_NOTE_SUCCESS, pSource);
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, 'NOTES_UPDATE_SUCCESS')
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_UPDATE_SUCCESS', type: 'success' })
|
||||
|
||||
} catch (error) {
|
||||
const pSource = (global as any).source;
|
||||
emitNet(events.NOTE_UPDATE_NOTE_FAILURE, pSource);
|
||||
emitNet(events.NOTE_ACTION_RESULT, pSource, { message: 'NOTES_UPDATE_FAILED', type: 'error' })
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user