From e31a91655de85b97905b9053b83e923566bd4f0c Mon Sep 17 00:00:00 2001
From: dartcafe <github@dartcafe.de>
Date: Sun, 21 Mar 2021 23:20:44 +0100
Subject: maintenance and tidy

Signed-off-by: dartcafe <github@dartcafe.de>
---
 src/js/components/Options/OptionsText.vue | 60 ++++++++++++-------------------
 1 file changed, 23 insertions(+), 37 deletions(-)

(limited to 'src/js/components/Options/OptionsText.vue')

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,
 	},
 
-- 
cgit v1.2.3

