mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(status): Store locally status message when editing
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
e2b377f85c
commit
7455df35e3
1 changed files with 13 additions and 7 deletions
|
|
@ -43,7 +43,7 @@
|
|||
<div class="set-status-modal__custom-input">
|
||||
<CustomMessageInput ref="customMessageInput"
|
||||
:icon="icon"
|
||||
:message="message"
|
||||
:message="editedMessage"
|
||||
@change="setMessage"
|
||||
@submit="saveStatus"
|
||||
@select-icon="setIcon" />
|
||||
|
|
@ -108,6 +108,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
clearAt: null,
|
||||
editedMessage: '',
|
||||
isSavingStatus: false,
|
||||
statuses: getAllStatusOptions(),
|
||||
}
|
||||
|
|
@ -153,6 +154,15 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
message: {
|
||||
immediate: true,
|
||||
handler(newValue) {
|
||||
this.editedMessage = newValue
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Loads the current status when a user opens dialog
|
||||
*/
|
||||
|
|
@ -194,11 +204,7 @@ export default {
|
|||
* @param {string} message The new message
|
||||
*/
|
||||
setMessage(message) {
|
||||
this.$store.dispatch('setCustomMessage', {
|
||||
message,
|
||||
icon: this.icon,
|
||||
clearAt: this.clearAt,
|
||||
})
|
||||
this.editedMessage = message
|
||||
},
|
||||
/**
|
||||
* Sets a new clearAt value
|
||||
|
|
@ -240,7 +246,7 @@ export default {
|
|||
})
|
||||
} else {
|
||||
await this.$store.dispatch('setCustomMessage', {
|
||||
message: this.message,
|
||||
message: this.editedMessage,
|
||||
icon: this.icon,
|
||||
clearAt: this.clearAt,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue