Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-01-21 08:53:12 +0300
committerdartcafe <github@dartcafe.de>2020-01-21 08:53:12 +0300
commitd4d75e01c24addc732316b38e75f6f46a42a2477 (patch)
treee2291745d99b3414c36d71dd3b2ffc1f3ff8ba85 /src/js/components/PollList
parentb94fcd7c285cb8b3edda6e26508d5ee26af4c827 (diff)
Changed PopoverMenu to Actions #594
Diffstat (limited to 'src/js/components/PollList')
-rw-r--r--src/js/components/PollList/PollListItem.vue57
1 files changed, 16 insertions, 41 deletions
diff --git a/src/js/components/PollList/PollListItem.vue b/src/js/components/PollList/PollListItem.vue
index e3f9b014..9f8a2cdd 100644
--- a/src/js/components/PollList/PollListItem.vue
+++ b/src/js/components/PollList/PollListItem.vue
@@ -62,14 +62,19 @@
</div>
</router-link>
- <div class="actions">
- <div class="toggleUserActions">
- <div v-click-outside="hideMenu" class="icon-more" @click="toggleMenu" />
- <div class="popovermenu" :class="{ 'open': openedMenu }">
- <PopoverMenu :menu="menuItems" />
- </div>
- </div>
- </div>
+ <Actions>
+ <ActionButton icon="icon-add" @click="clonePoll()">
+ {{ t('polls', 'Clone poll') }}
+ </ActionButton>
+
+ <ActionButton v-if="poll.owner === OC.getCurrentUser().uid && !poll.deleted" icon="icon-delete" @click="switchDeleted()">
+ {{ t('polls', 'Delete poll') }}
+ </ActionButton>
+
+ <ActionButton v-if="poll.owner === OC.getCurrentUser().uid && poll.deleted" icon="icon-history" @click="switchDeleted()">
+ {{ t('polls', 'Restore poll') }}
+ </ActionButton>
+ </Actions>
<div v-tooltip.auto="accessType" class="thumbnail access" :class="poll.access">
{{ accessType }}
@@ -89,13 +94,14 @@
</template>
<script>
-import { PopoverMenu } from '@nextcloud/vue'
+import { Actions, ActionButton } from '@nextcloud/vue'
export default {
name: 'PollListItem',
components: {
- PopoverMenu
+ Actions,
+ ActionButton
},
props: {
@@ -153,37 +159,6 @@ export default {
} else {
return t('polls', 'never')
}
- },
-
- menuItems() {
- const items = [
- {
- key: 'clonePoll',
- icon: 'icon-add',
- text: t('polls', 'Clone poll'),
- action: this.clonePoll
- }
- ]
-
- if (this.poll.owner === OC.getCurrentUser().uid && !this.poll.deleted) {
- items.push({
- key: 'switchDeleted',
- icon: 'icon-delete',
- text: t('polls', 'Delete poll'),
- action: this.switchDeleted
- })
- }
-
- if (this.poll.deleted) {
- items.push({
- key: 'switchDeleted',
- icon: 'icon-history',
- text: t('polls', 'Restore poll'),
- action: this.switchDeleted
- })
- }
-
- return items
}
},