Add note saving indicator

This commit is contained in:
Sol Fisher Romanoff 2022-06-23 15:04:19 +03:00
parent 4f0eabbd55
commit 398b2624c8
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
2 changed files with 38 additions and 8 deletions

View file

@ -42,7 +42,8 @@ const UserProfile = {
userId: null,
tab: defaultTabKey,
footerRef: null,
note: null
note: null,
noteLoading: false
}
},
created () {
@ -152,8 +153,13 @@ const UserProfile = {
window.open(target.href, '_blank')
}
},
setNote: debounce(function () {
setNote () {
this.noteLoading = true
this.debounceSetNote()
},
debounceSetNote: debounce(function () {
this.$store.dispatch('setNote', { id: this.userId, note: this.note })
this.noteLoading = false
}, 1500)
},
watch: {