Skip to content

Commit fc42c8d

Browse files
Merge pull request #4947 from LibreSign/feat/add-administration-settings-to-settings-menu
feat: add administration settings to settings menu
2 parents 040d27c + 04cd280 commit fc42c8d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/Components/Settings/Settings.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
<NcAppNavigationItem icon="icon-user"
99
:name="t('libresign', 'Account')"
1010
:to=" {name: 'Account'} " />
11+
<NcAppNavigationItem v-if="isAdmin"
12+
:name="t('libresign', 'Administration')"
13+
:href="getAdminRoute()">
14+
<template #icon>
15+
<TuneIcon :size="20" />
16+
</template>
17+
</NcAppNavigationItem>
1118
<NcAppNavigationItem :name="t('libresign', 'Rate LibreSign ❤️')"
1219
href="https://apps.nextcloud.com/apps/libresign#comments">
1320
<template #icon>
@@ -19,6 +26,10 @@
1926

2027
<script>
2128
import StarIcon from 'vue-material-design-icons/Star.vue'
29+
import TuneIcon from 'vue-material-design-icons/Tune.vue'
30+
31+
import { getCurrentUser } from '@nextcloud/auth'
32+
import { generateUrl } from '@nextcloud/router'
2233

2334
import NcAppNavigationItem from '@nextcloud/vue/components/NcAppNavigationItem'
2435

@@ -27,6 +38,17 @@ export default {
2738
components: {
2839
NcAppNavigationItem,
2940
StarIcon,
41+
TuneIcon,
42+
},
43+
data() {
44+
return {
45+
isAdmin: getCurrentUser().isAdmin,
46+
}
47+
},
48+
methods: {
49+
getAdminRoute() {
50+
return generateUrl('settings/admin/libresign')
51+
},
3052
},
3153
}
3254
</script>

0 commit comments

Comments
 (0)