pleroma-fe/src/components/user_note/user_note.js
2022-12-21 23:16:00 -05:00

32 lines
513 B
JavaScript

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