koel/resources/assets/js/components/layout/main-wrapper/sidebar/SidebarManageSection.vue

40 lines
1.3 KiB
Vue
Raw Normal View History

2024-04-04 22:20:42 +00:00
<template>
<SidebarSection>
<template #header>
<SidebarSectionHeader>Manage</SidebarSectionHeader>
</template>
<ul class="menu">
2024-04-23 21:01:27 +00:00
<SidebarItem v-if="isAdmin" href="#/settings" screen="Settings">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faTools" fixed-width />
</template>
Settings
</SidebarItem>
2024-04-23 21:01:27 +00:00
<SidebarItem v-if="allowsUpload" href="#/upload" screen="Upload">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faUpload" fixed-width />
</template>
Upload
</SidebarItem>
2024-04-23 21:01:27 +00:00
<SidebarItem v-if="isAdmin" href="#/users" screen="Users">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faUsers" fixed-width />
</template>
Users
</SidebarItem>
</ul>
</SidebarSection>
</template>
2024-04-23 21:01:27 +00:00
<script lang="ts" setup>
2024-04-04 22:20:42 +00:00
import { faTools, faUpload, faUsers } from '@fortawesome/free-solid-svg-icons'
2024-04-23 15:20:40 +00:00
import { useAuthorization, useUpload } from '@/composables'
2024-04-04 22:20:42 +00:00
import SidebarSection from '@/components/layout/main-wrapper/sidebar/SidebarSection.vue'
import SidebarSectionHeader from '@/components/layout/main-wrapper/sidebar/SidebarSectionHeader.vue'
import SidebarItem from '@/components/layout/main-wrapper/sidebar/SidebarItem.vue'
const { isAdmin } = useAuthorization()
2024-04-23 15:20:40 +00:00
const { allowsUpload } = useUpload()
2024-04-04 22:20:42 +00:00
</script>