Fixed save bug
Tweaked animations Updated help page
This commit is contained in:
parent
b2dc6e5218
commit
534bcb47cf
@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,10 @@
|
||||
<p>Bold – Type **text** or __text__,</p>
|
||||
<p>Italic – Type *text* or _text_,</p>
|
||||
<p>Code – Type `text`.</p>
|
||||
|
||||
<h2>Dark Theme</h2>
|
||||
<p>Dark theme was desigend to minimize the amount of blue the app contains.</p>
|
||||
<p>Making it easier to fall asleep at night.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
<div class="ui right floated basic button"
|
||||
data-tooltip="Log Out" data-position="left center"
|
||||
v-on:click="destroyLoginToken">{{username}}</div>
|
||||
v-on:click="destroyLoginToken"><i class="user icon"></i> {{username}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user