diff options
Diffstat (limited to 'src/js/components/Options/OptionsText.vue')
-rw-r--r-- | src/js/components/Options/OptionsText.vue | 60 |
1 files changed, 23 insertions, 37 deletions
diff --git a/src/js/components/Options/OptionsText.vue b/src/js/components/Options/OptionsText.vue index 51e4eed5..83511451 100644 --- a/src/js/components/Options/OptionsText.vue +++ b/src/js/components/Options/OptionsText.vue @@ -21,45 +21,33 @@ --> <template> - <div> - <ConfigBox v-if="countOptions" :title="t('polls', 'Available Options')" icon-class="icon-toggle-filelist"> - <draggable v-model="reOrderedOptions"> - <transition-group> - <OptionItem v-for="(option) in reOrderedOptions" - :key="option.id" - :option="option" - :draggable="true"> - <template #actions> - <Actions v-if="acl.allowEdit" class="action"> - <ActionButton icon="icon-delete" @click="removeOption(option)"> - {{ t('polls', 'Delete option') }} - </ActionButton> - </Actions> - <Actions v-if="acl.allowEdit" class="action"> - <ActionButton v-if="PollIsClosed" :icon="option.confirmed ? 'icon-polls-yes' : 'icon-checkmark'" - @click="confirmOption(option)"> - {{ option.confirmed ? t('polls', 'Unconfirm option') : t('polls', 'Confirm option') }} - </ActionButton> - </Actions> - </template> - </OptionItem> - </transition-group> - </draggable> - </ConfigBox> - - <EmptyContent v-else icon="icon-toggle-filelist"> - {{ t('polls', 'No vote options') }} - <template #desc> - {{ t('polls', 'Add some!') }} - </template> - </EmptyContent> - </div> + <draggable v-model="reOrderedOptions"> + <transition-group> + <OptionItem v-for="(option) in reOrderedOptions" + :key="option.id" + :option="option" + :draggable="true"> + <template #actions> + <Actions v-if="acl.allowEdit" class="action"> + <ActionButton icon="icon-delete" @click="removeOption(option)"> + {{ t('polls', 'Delete option') }} + </ActionButton> + </Actions> + <Actions v-if="acl.allowEdit" class="action"> + <ActionButton v-if="PollIsClosed" :icon="option.confirmed ? 'icon-polls-yes' : 'icon-checkmark'" + @click="confirmOption(option)"> + {{ option.confirmed ? t('polls', 'Unconfirm option') : t('polls', 'Confirm option') }} + </ActionButton> + </Actions> + </template> + </OptionItem> + </transition-group> + </draggable> </template> <script> import { mapGetters, mapState } from 'vuex' -import { Actions, ActionButton, EmptyContent } from '@nextcloud/vue' -import ConfigBox from '../Base/ConfigBox' +import { Actions, ActionButton } from '@nextcloud/vue' import draggable from 'vuedraggable' import OptionItem from './OptionItem' import { confirmOption, removeOption } from '../../mixins/optionMixins' @@ -70,9 +58,7 @@ export default { components: { Actions, ActionButton, - ConfigBox, draggable, - EmptyContent, OptionItem, }, |