diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-04-24 11:25:52 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-05-16 09:50:22 +0200 |
commit | 62e1014b2ed9752eae6e0a51cd77f8a0a7c9c94c (patch) | |
tree | 42c5a1083e06e07fd2ec9d7f5454287c996be656 /settings/src/components/popoverMenu/popoverItem.vue | |
parent | f4cec587d972b751a5a3cea44e11804e100ff329 (diff) | |
download | nextcloud-server-62e1014b2ed9752eae6e0a51cd77f8a0a7c9c94c.tar.gz nextcloud-server-62e1014b2ed9752eae6e0a51cd77f8a0a7c9c94c.zip |
Bump popovermenu item options and tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src/components/popoverMenu/popoverItem.vue')
-rw-r--r-- | settings/src/components/popoverMenu/popoverItem.vue | 16 |
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> |