diff --git a/client/src/components/NoteInputPanel.vue b/client/src/components/NoteInputPanel.vue index 1c1ce50..dbcc05d 100644 --- a/client/src/components/NoteInputPanel.vue +++ b/client/src/components/NoteInputPanel.vue @@ -151,6 +151,7 @@ vm.noteText = response.data.text vm.updated = response.data.updated vm.lastNoteHash = vm.hashString(response.data.text) + console.log(vm.lastNoteHash) vm.color = response.data.color this.fontColor = '#FFF' @@ -229,10 +230,9 @@ //Don't save note if its hash doesn't change if( this.lastNoteHash == this.hashString(this.noteText) ){ - setTimeout(() => { - resolve(true) - return - }, 300) + console.log('Note was not modified') + resolve(false) + return } const postData = { @@ -255,6 +255,7 @@ //Update last saved note hash vm.lastNoteHash = vm.hashString(vm.noteText) resolve(true) + return }) }, 300) }) @@ -274,8 +275,17 @@ }, close(){ this.sizeDown = true - this.save().then( () => { - this.$bus.$emit('close_active_note', this.position) + this.save().then( result => { + //Save has a 300 ms timeout, if it saves animation will complete + if(result){ + this.$bus.$emit('close_active_note', this.position) + return + } else { + //If save is not called, set timeout manually and then close after animation + setTimeout(() => { + this.$bus.$emit('close_active_note', this.position) + }, 300) + } }) } diff --git a/client/src/pages/HelpPage.vue b/client/src/pages/HelpPage.vue index 8b579a0..7ef167a 100644 --- a/client/src/pages/HelpPage.vue +++ b/client/src/pages/HelpPage.vue @@ -24,6 +24,10 @@

Bold – Type **text** or __text__,

Italic – Type *text* or _text_,

Code – Type `text`.

+ +

Dark Theme

+

Dark theme was desigend to minimize the amount of blue the app contains.

+

Making it easier to fall asleep at night.

diff --git a/client/src/pages/NotesPage.vue b/client/src/pages/NotesPage.vue index 2b968c6..69c5792 100644 --- a/client/src/pages/NotesPage.vue +++ b/client/src/pages/NotesPage.vue @@ -48,7 +48,7 @@
{{username}}
+ v-on:click="destroyLoginToken"> {{username}}