2024-04-04 22:20:42 +00:00
|
|
|
<template>
|
|
|
|
<ExtraDrawerButton
|
|
|
|
v-koel-tooltip.left
|
|
|
|
:title="shouldNotifyNewVersion ? 'New version available!' : 'About Koel'"
|
|
|
|
@click.prevent="openAboutKoelModal"
|
|
|
|
>
|
|
|
|
<Icon :icon="faInfoCircle" />
|
|
|
|
<span
|
|
|
|
v-if="shouldNotifyNewVersion"
|
|
|
|
class="absolute w-[10px] aspect-square right-px top-px rounded-full bg-k-highlight"
|
2024-04-23 15:20:40 +00:00
|
|
|
data-testid="new-version-indicator"
|
2024-04-04 22:20:42 +00:00
|
|
|
/>
|
|
|
|
</ExtraDrawerButton>
|
|
|
|
</template>
|
|
|
|
|
2024-04-23 21:01:27 +00:00
|
|
|
<script lang="ts" setup>
|
2024-04-04 22:20:42 +00:00
|
|
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
import { eventBus } from '@/utils'
|
|
|
|
import { useNewVersionNotification } from '@/composables'
|
|
|
|
|
|
|
|
import ExtraDrawerButton from '@/components/layout/main-wrapper/extra-drawer/ExtraDrawerButton.vue'
|
|
|
|
|
|
|
|
const { shouldNotifyNewVersion } = useNewVersionNotification()
|
|
|
|
|
|
|
|
const openAboutKoelModal = () => eventBus.emit('MODAL_SHOW_ABOUT_KOEL')
|
|
|
|
</script>
|