From 1c5fb16809064bc5978eeb54a9bc2c927f50da06 Mon Sep 17 00:00:00 2001 From: Aleksei Efremov Date: Thu, 30 Nov 2023 15:22:38 +0200 Subject: [PATCH] Save label on new share creation --- src/mixins/SharesMixin.js | 3 ++- src/views/SharingDetailsTab.vue | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mixins/SharesMixin.js b/src/mixins/SharesMixin.js index edb1981..a23bfc6 100755 --- a/src/mixins/SharesMixin.js +++ b/src/mixins/SharesMixin.js @@ -277,7 +277,7 @@ export default { // force value to string because that is what our // share api controller accepts propertyNames.forEach(name => { - if (this.mutableShare && (name === 'note' || name === 'password')) { + if (this.mutableShare && ['note', 'password', 'label'].includes(name)) { properties[name] = this.mutableShare[name].toString() } else if ((typeof this.share[name]) === 'object') { properties[name] = JSON.stringify(this.share[name]) @@ -304,6 +304,7 @@ export default { // clear any previous errors this.$delete(this.errors, propertyNames[0]) this.share.note = updatedShare.note + this.share.label = updatedShare.label showSuccess(t('nmcsharing', 'Share updated')) } catch ({ message }) { if (message && message !== '') { diff --git a/src/views/SharingDetailsTab.vue b/src/views/SharingDetailsTab.vue index 663031a..e90ffa3 100755 --- a/src/views/SharingDetailsTab.vue +++ b/src/views/SharingDetailsTab.vue @@ -45,7 +45,7 @@