|
@@ -2,4 +2,11 @@ const { ipcRenderer } = require('electron');
|
|
|
|
|
|
ipcRenderer.on('reset-app', (event, arg) => {
|
|
|
document.location = 'reset.html';
|
|
|
+});
|
|
|
+
|
|
|
+ipcRenderer.on('new-note', (event, arg) => {
|
|
|
+ const current = document.location.pathname.split('/').pop();
|
|
|
+ if (current !== 'edit.html' || (document.location.search.trim() !== '' && current === 'edit.html')) {
|
|
|
+ document.location = 'edit.html';
|
|
|
+ }
|
|
|
});
|