diff --git a/front/src/components/audio/track/Row.vue b/front/src/components/audio/track/Row.vue index c119a6155..35273905a 100644 --- a/front/src/components/audio/track/Row.vue +++ b/front/src/components/audio/track/Row.vue @@ -9,10 +9,9 @@ import PlayButton from '~/components/audio/PlayButton.vue' import usePlayOptions from '~/composables/audio/usePlayOptions' import useQueue from '~/composables/audio/useQueue' import usePlayer from '~/composables/audio/usePlayer' -import { ref } from 'vue' +import { computed } from 'vue' interface Props extends PlayOptionsProps { - tracks: Track[] track: Track index: number @@ -23,7 +22,10 @@ interface Props extends PlayOptionsProps { showPosition?: boolean displayActions?: boolean + hover: boolean + // TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged + tracks: Track[] isPlayable?: boolean artist?: Artist | null album?: Album | null @@ -42,22 +44,16 @@ const props = withDefaults(defineProps(), { displayActions: true }) -const hover = ref(null) - -const { playing } = usePlayer() +const { playing, loading } = usePlayer() const { currentTrack } = useQueue() const { activateTrack } = usePlayOptions(props) +const active = computed(() => props.track.id === currentTrack.value?.id && props.track.position === currentTrack.value?.position)