fix(front): Use new split playbutton in albumcards and show default covers, related to #2384
This commit is contained in:
parent
c6854d8ceb
commit
d18c1462a6
|
@ -1,10 +1,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { momentFormat } from '~/utils/filters'
|
||||||
|
|
||||||
import PlayButton from '~/components/ui/button/Play.vue'
|
import Play from '~/components/ui/button/Play.vue'
|
||||||
|
import PlayButton from '~/components/audio/PlayButton.vue'
|
||||||
import OptionsButton from '~/components/ui/button/Options.vue'
|
import OptionsButton from '~/components/ui/button/Options.vue'
|
||||||
import Card from '~/components/ui/Card.vue'
|
import Card from '~/components/ui/Card.vue'
|
||||||
|
import Link from '~/components/ui/Link.vue'
|
||||||
import TagsList from '~/components/tags/List.vue'
|
import TagsList from '~/components/tags/List.vue'
|
||||||
|
|
||||||
import type { Album } from '~/types'
|
import type { Album } from '~/types'
|
||||||
|
@ -38,19 +41,29 @@ if (import.meta.env.PROD) {
|
||||||
<Card
|
<Card
|
||||||
:title="album.title"
|
:title="album.title"
|
||||||
:image="album.cover?.urls.original"
|
:image="album.cover?.urls.original"
|
||||||
class="album-card"
|
:to="{name: 'library.albums.detail', params: {id: album.id}}"
|
||||||
>
|
>
|
||||||
<PlayButton @play="play(album)" />
|
<template #image
|
||||||
|
v-if="!album.cover || !album.cover.urls.original"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
:class="[{'default-cover': !album.cover || !album.cover.urls.original}]"
|
||||||
|
style="height: 200px; background-repeat: no-repeat; margin: 39px;"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<a
|
<template
|
||||||
v-for="ac in album.artist_credit"
|
v-for="ac in album.artist_credit"
|
||||||
:key="ac.artist.id"
|
:key="ac.artist.id"
|
||||||
class="funkwhale link"
|
>
|
||||||
@click.stop="navigate('artist')"
|
<router-link
|
||||||
|
:to="{ name: 'library.artists.detail', params: { id: ac.artist.id }}"
|
||||||
>
|
>
|
||||||
{{ ac.credit ?? t('components.Queue.meta.unknownArtist') }}
|
{{ ac.credit ?? t('components.Queue.meta.unknownArtist') }}
|
||||||
{{ ac.joinphrase }}
|
</router-link>
|
||||||
</a>
|
<span>{{ ac.joinphrase }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<TagsList
|
<TagsList
|
||||||
label-classes="tiny"
|
label-classes="tiny"
|
||||||
|
@ -60,16 +73,21 @@ if (import.meta.env.PROD) {
|
||||||
:tags="album.tags"
|
:tags="album.tags"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<router-link
|
<template #action>
|
||||||
class="discrete link"
|
<span v-if="album.release_date">
|
||||||
:to="{name: 'library.albums.detail', params: {id: album.id}}"
|
{{ momentFormat(new Date(album.release_date), 'Y') }}
|
||||||
>
|
</span>
|
||||||
Go to album
|
<span>
|
||||||
</router-link>
|
<i class="bi bi-music-note-list" />
|
||||||
|
{{ t('components.audio.album.Card.meta.tracks', album.tracks_count) }}
|
||||||
<template #footer>
|
</span>
|
||||||
{{ t('components.audio.album.Card.meta.tracks', album.tracks?.length || 0) }}
|
<Spacer style="flex-grow: 1" />
|
||||||
<OptionsButton />
|
<PlayButton
|
||||||
|
id="playmenu"
|
||||||
|
:dropdown-only="true"
|
||||||
|
:is-playable="album.is_playable"
|
||||||
|
:album="album"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</Card>
|
</Card>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue