mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
fix: time display for album track list
This commit is contained in:
parent
dfe1a8e45c
commit
75a6ef2107
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ import { computed, defineAsyncComponent, Ref, toRefs } from 'vue'
|
||||||
import { queueStore, songStore } from '@/stores'
|
import { queueStore, songStore } from '@/stores'
|
||||||
import { authService, playbackService } from '@/services'
|
import { authService, playbackService } from '@/services'
|
||||||
import { useThirdPartyServices } from '@/composables'
|
import { useThirdPartyServices } from '@/composables'
|
||||||
import { requireInjection, secondsToHumanReadable } from '@/utils'
|
import { requireInjection, secondsToHis } from '@/utils'
|
||||||
import { SongsKey } from '@/symbols'
|
import { SongsKey } from '@/symbols'
|
||||||
|
|
||||||
const AppleMusicButton = defineAsyncComponent(() => import('@/components/ui/AppleMusicButton.vue'))
|
const AppleMusicButton = defineAsyncComponent(() => import('@/components/ui/AppleMusicButton.vue'))
|
||||||
|
@ -31,7 +31,7 @@ const songsToMatchAgainst = requireInjection<Ref<Song[]>>(SongsKey)
|
||||||
|
|
||||||
const matchedSong = computed(() => songStore.match(track.value.title, songsToMatchAgainst.value))
|
const matchedSong = computed(() => songStore.match(track.value.title, songsToMatchAgainst.value))
|
||||||
const tooltip = computed(() => matchedSong.value ? 'Click to play' : '')
|
const tooltip = computed(() => matchedSong.value ? 'Click to play' : '')
|
||||||
const fmtLength = computed(() => secondsToHumanReadable(track.value.length))
|
const fmtLength = computed(() => secondsToHis(track.value.length))
|
||||||
|
|
||||||
const active = computed(() => matchedSong.value && matchedSong.value.playback_state !== 'Stopped')
|
const active = computed(() => matchedSong.value && matchedSong.value.playback_state !== 'Stopped')
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
exports[`renders 1`] = `
|
exports[`renders 1`] = `
|
||||||
<div class="track-list-item" title="" tabindex="0" data-v-da281390=""><span class="title" data-v-da281390="">Fahrstuhl to Heaven</span>
|
<div class="track-list-item" title="" tabindex="0" data-v-da281390=""><span class="title" data-v-da281390="">Fahrstuhl to Heaven</span>
|
||||||
<!----><span class="length" data-v-da281390="">4 min 40 sec</span>
|
<!----><span class="length" data-v-da281390="">04:40</span>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in a new issue