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

60 lines
2 KiB
Vue
Raw Normal View History

2024-04-04 22:20:42 +00:00
<template>
<SidebarSection>
<template #header>
2024-05-19 05:49:42 +00:00
<SidebarSectionHeader>Your Library</SidebarSectionHeader>
2024-04-04 22:20:42 +00:00
</template>
<ul class="menu">
2024-04-23 21:01:27 +00:00
<SidebarItem href="#/songs" screen="Songs">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faMusic" fixed-width />
</template>
All Songs
</SidebarItem>
2024-04-23 21:01:27 +00:00
<SidebarItem href="#/albums" screen="Albums">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faCompactDisc" fixed-width />
</template>
Albums
</SidebarItem>
2024-04-23 21:01:27 +00:00
<SidebarItem href="#/artists" screen="Artists">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faMicrophone" fixed-width />
</template>
Artists
</SidebarItem>
2024-04-23 21:01:27 +00:00
<SidebarItem href="#/genres" screen="Genres">
2024-04-04 22:20:42 +00:00
<template #icon>
<Icon :icon="faTags" fixed-width />
</template>
Genres
</SidebarItem>
2024-04-23 15:20:40 +00:00
<YouTubeSidebarItem v-if="youtubeVideoTitle" data-testid="youtube">
{{ youtubeVideoTitle }}
</YouTubeSidebarItem>
2024-05-19 05:49:42 +00:00
<SidebarItem href="#/podcasts" screen="Podcasts">
<template #icon>
<Icon :icon="faPodcast" fixed-width />
</template>
Podcasts
</SidebarItem>
2024-04-04 22:20:42 +00:00
</ul>
</SidebarSection>
</template>
2024-04-23 21:01:27 +00:00
<script lang="ts" setup>
2024-05-19 05:49:42 +00:00
import { faCompactDisc, faMicrophone, faMusic, faTags, faPodcast } from '@fortawesome/free-solid-svg-icons'
2024-04-23 15:20:40 +00:00
import { unescape } from 'lodash'
import { ref } from 'vue'
2024-04-04 22:20:42 +00:00
import { eventBus } from '@/utils'
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'
import YouTubeSidebarItem from '@/components/layout/main-wrapper/sidebar/YouTubeSidebarItem.vue'
2024-04-23 15:20:40 +00:00
const youtubeVideoTitle = ref<string | null>(null)
2024-04-04 22:20:42 +00:00
2024-04-23 15:20:40 +00:00
eventBus.on('PLAY_YOUTUBE_VIDEO', payload => (youtubeVideoTitle.value = unescape(payload.title)))
2024-04-04 22:20:42 +00:00
</script>