summaryrefslogtreecommitdiffstats
path: root/settings/src/components/popoverMenu/popoverItem.vue
diff options
context:
space:
mode:
Diffstat (limited to 'settings/src/components/popoverMenu/popoverItem.vue')
-rw-r--r--settings/src/components/popoverMenu/popoverItem.vue16
1 files changed, 13 insertions, 3 deletions
diff --git a/settings/src/components/popoverMenu/popoverItem.vue b/settings/src/components/popoverMenu/popoverItem.vue
index 343c4638005..710aff80aa6 100644
--- a/settings/src/components/popoverMenu/popoverItem.vue
+++ b/settings/src/components/popoverMenu/popoverItem.vue
@@ -1,13 +1,23 @@
<template>
<li>
+ <!-- If item.href is set, a link will be directly used -->
<a @click="item.action" v-if="item.href" :href="(item.href) ? item.href : '#' ">
<span :class="item.icon"></span>
- <span>{{item.text}}</span>
+ <span v-if="item.text">{{item.text}}</span>
+ <p v-else-if="item.longtext">{{item.longtext}}</p>
</a>
- <button @click="item.action" v-else>
+ <!-- If item.action is set instead, a button will be used -->
+ <button @click="item.action" v-else-if="item.action">
<span :class="item.icon"></span>
- <span>{{item.text}}</span>
+ <span v-if="item.text">{{item.text}}</span>
+ <p v-else-if="item.longtext">{{item.longtext}}</p>
</button>
+ <!-- If item.longtext is set AND the item does not have an action -->
+ <span v-else>
+ <span :class="item.icon"></span>
+ <span v-if="item.text">{{item.text}}</span>
+ <p v-else-if="item.longtext">{{item.longtext}}</p>
+ </span>
</li>
</template>