Added counts to each category

Counts update on certain events and show or hide various elements
Fixed various little ui element issues

fixes #6
This commit is contained in:
Max G
2020-02-11 21:11:14 +00:00
parent cf3289aac6
commit 05152cd5a4
14 changed files with 169 additions and 39 deletions

View File

@@ -202,6 +202,7 @@
loading: true,
loadingMessage: 'Loading Note',
currentNoteId: 0,
modified: false,
noteText: '',
rawTextId: 0,
shareUsername: null,
@@ -873,21 +874,16 @@
'archived':this.archived,
}
let vm = this
//Debounce save to prevent spamming
// clearTimeout(this.saveDebounce)
// this.saveDebounce = setTimeout(() => {
//Only notify user if saving - may help with debugging in the future
vm.statusText = 'Saving'
axios.post('/api/note/update', postData).then( response => {
vm.statusText = 'Saved'
vm.updated = Math.round((+new Date)/1000)
this.statusText = 'Saving'
axios.post('/api/note/update', postData).then( response => {
this.statusText = 'Saved'
this.updated = Math.round((+new Date)/1000)
this.modified = true
//Update last saved note hash
vm.lastNoteHash = vm.hashString( currentNoteText )
return resolve(true)
})
// }, 300)
//Update last saved note hash
this.lastNoteHash = this.hashString( currentNoteText )
return resolve(true)
})
})
},
checkForUpdatedNote(){
@@ -949,7 +945,9 @@
this.sizeDown = true
//This timeout allows animation to play before closing
setTimeout(() => {
this.$bus.$emit('close_active_note', {position: this.position, noteId: this.noteid})
this.$bus.$emit('close_active_note', {
position: this.position, noteId: this.noteid, modified: this.modified
})
return
}, 300)
})