Add ui for note editing

This commit is contained in:
Tusooa Zhu 2022-08-20 13:02:27 -04:00 committed by tusooa
commit 1101305ffb
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 138 additions and 2 deletions

View file

@ -0,0 +1,31 @@
const UserNote = {
props: {
user: Object,
relationship: Object
},
data () {
return {
localNote: '',
editing: false
}
},
computed: {
shouldShow () {
return this.relationship.note || this.editing
}
},
methods: {
startEditing () {
this.localNote = this.relationship.note
this.editing = true
},
cancelEditing () {
this.editing = false
},
finalizeEditing () {
this.editing = false
}
}
}
export default UserNote