diff options
author | dartcafe <github@dartcafe.de> | 2022-02-01 01:50:58 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-02-01 01:50:58 +0300 |
commit | 7abfa852f119885f18f73b5eb218c4f19a4348c9 (patch) | |
tree | 794f22d4555ed426b5c100e25a6529752b4813f1 /src/js/components/Options | |
parent | ee92ce3d0e0c4ac9ae8ef72b2090e19c6dee7f75 (diff) |
store refactoring
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Options')
-rw-r--r-- | src/js/components/Options/Counter.vue | 6 | ||||
-rw-r--r-- | src/js/components/Options/OptionItem.vue | 4 | ||||
-rw-r--r-- | src/js/components/Options/OptionItemOwner.vue | 14 | ||||
-rw-r--r-- | src/js/components/Options/OptionsTextAdd.vue | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/js/components/Options/Counter.vue b/src/js/components/Options/Counter.vue index 34344ce8..fd4d6245 100644 --- a/src/js/components/Options/Counter.vue +++ b/src/js/components/Options/Counter.vue @@ -24,13 +24,13 @@ <div class="counter"> <div class="counter--icon"> <div class="yes"> - <span>{{ option.yes }}</span> + <span>{{ option.computed.yes }}</span> </div> <div v-if="showMaybe" class="maybe"> - <span>{{ option.maybe }}</span> + <span>{{ option.computed.maybe }}</span> </div> <div v-if="showNo" class="no"> - <span>{{ option.no }}</span> + <span>{{ option.computed.no }}</span> </div> </div> </div> diff --git a/src/js/components/Options/OptionItem.vue b/src/js/components/Options/OptionItem.vue index bb21be30..7fa9a29b 100644 --- a/src/js/components/Options/OptionItem.vue +++ b/src/js/components/Options/OptionItem.vue @@ -187,7 +187,7 @@ export default { return this.dateLocalFormatUTC } - return this.option.pollOptionText + return this.option.text }, optionText() { @@ -195,7 +195,7 @@ export default { return this.dateLocalFormat } - return linkifyStr(this.option.pollOptionText) + return linkifyStr(this.option.text) }, show() { diff --git a/src/js/components/Options/OptionItemOwner.vue b/src/js/components/Options/OptionItemOwner.vue index b5c5becb..9f51730b 100644 --- a/src/js/components/Options/OptionItemOwner.vue +++ b/src/js/components/Options/OptionItemOwner.vue @@ -22,17 +22,17 @@ <template> <div class="option-item-owner"> - <ActionDelete v-if="!acl.allowEdit && acl.userId === option.owner" + <ActionDelete v-if="!acl.allowEdit && acl.userId === option.owner.userId" :title="t('polls', 'Delete option')" @delete="removeOption(option)" /> - <Avatar v-else-if="option.owner && option.owner !== pollOwner" - :user="option.owner" - :display-name="option.ownerDisplayName" - :is-no-user="option.ownerIsNoUser" + <Avatar v-else-if="option.owner.userId && option.owner.userId !== pollOwner" + :user="option.owner.userId" + :display-name="option.owner.displayName" + :is-no-user="option.owner.isNoUser" disable-menu :size="avatarSize" - :tooltip-message="t('polls', '{displayName}\'s proposal', { displayName: option.ownerDisplayName })" /> + :tooltip-message="t('polls', '{displayName}\'s proposal', { displayName: option.owner.displayName })" /> </div> </template> @@ -67,7 +67,7 @@ export default { computed: { ...mapState({ - pollOwner: (state) => state.poll.owner, + pollOwner: (state) => state.poll.owner.userId, acl: (state) => state.poll.acl, }), diff --git a/src/js/components/Options/OptionsTextAdd.vue b/src/js/components/Options/OptionsTextAdd.vue index 5125131e..7a5c3561 100644 --- a/src/js/components/Options/OptionsTextAdd.vue +++ b/src/js/components/Options/OptionsTextAdd.vue @@ -54,7 +54,7 @@ export default { async addOption() { if (this.newPollText) { try { - await this.$store.dispatch('options/add', { pollOptionText: this.newPollText }) + await this.$store.dispatch('options/add', { text: this.newPollText }) showSuccess(t('polls', '{optionText} added', { optionText: this.newPollText })) this.newPollText = '' } catch (e) { |