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

22 lines
537 B
Vue
Raw Normal View History

<template>
2024-04-04 22:20:42 +00:00
<SidebarItem screen="YouTube" href="#/youtube">
<template #icon>
<Icon :icon="faYoutube" fixed-width />
</template>
{{ title }}
</SidebarItem>
</template>
<script lang="ts" setup>
2024-04-04 22:20:42 +00:00
import { unescape } from 'lodash'
import { faYoutube } from '@fortawesome/free-brands-svg-icons'
import { ref } from 'vue'
import { eventBus } from '@/utils'
import SidebarItem from './SidebarItem.vue'
const title = ref('')
2024-04-04 22:20:42 +00:00
eventBus.on('PLAY_YOUTUBE_VIDEO', payload => (title.value = unescape(payload.title)))
</script>