fix(front): Actorlink and ArtistLinks consistency.
This commit is contained in:
parent
f81ac12fa4
commit
b913eb8dc6
|
@ -18,6 +18,7 @@ import { useI18n } from 'vue-i18n'
|
||||||
import TrackFavoriteIcon from '~/components/favorites/TrackFavoriteIcon.vue'
|
import TrackFavoriteIcon from '~/components/favorites/TrackFavoriteIcon.vue'
|
||||||
import TrackPlaylistIcon from '~/components/playlists/TrackPlaylistIcon.vue'
|
import TrackPlaylistIcon from '~/components/playlists/TrackPlaylistIcon.vue'
|
||||||
import PlayerControls from '~/components/audio/PlayerControls.vue'
|
import PlayerControls from '~/components/audio/PlayerControls.vue'
|
||||||
|
import ActorLink from '~/components/audio/ArtistCreditLabel.vue'
|
||||||
|
|
||||||
import VirtualList from '~/components/vui/list/VirtualList.vue'
|
import VirtualList from '~/components/vui/list/VirtualList.vue'
|
||||||
import QueueItem from '~/components/QueueItem.vue'
|
import QueueItem from '~/components/QueueItem.vue'
|
||||||
|
@ -27,6 +28,7 @@ import Spacer from '~/components/ui/Spacer.vue'
|
||||||
import Link from '~/components/ui/Link.vue'
|
import Link from '~/components/ui/Link.vue'
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
import Pill from '~/components/ui/Pill.vue'
|
import Pill from '~/components/ui/Pill.vue'
|
||||||
|
import ArtistCreditLabel from '~/components/audio/ArtistCreditLabel.vue'
|
||||||
|
|
||||||
const MilkDrop = defineAsyncComponent(() => import('~/components/audio/visualizer/MilkDrop.vue'))
|
const MilkDrop = defineAsyncComponent(() => import('~/components/audio/visualizer/MilkDrop.vue'))
|
||||||
|
|
||||||
|
@ -296,35 +298,9 @@ if (!isWebGLSupported) {
|
||||||
</template>
|
</template>
|
||||||
</h2>
|
</h2>
|
||||||
<span>
|
<span>
|
||||||
<Layout
|
<ArtistCreditLabel
|
||||||
flex
|
:artist-credit="currentTrack.artistCredit || undefined"
|
||||||
gap-8
|
/>
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-for="ac in currentTrack.artistCredit"
|
|
||||||
:key="ac.artist.id"
|
|
||||||
>
|
|
||||||
<router-link
|
|
||||||
:to="{name: 'library.artists.detail', params: {id: ac.artist.id }}"
|
|
||||||
@click.stop.prevent=""
|
|
||||||
>
|
|
||||||
<Pill>
|
|
||||||
<template #image>
|
|
||||||
<img
|
|
||||||
v-if="ac.artist.cover"
|
|
||||||
v-lazy="ac.artist.cover?.urls.small_square_crop"
|
|
||||||
>
|
|
||||||
<i
|
|
||||||
v-else
|
|
||||||
class="bi bi-person-circle"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
{{ ac.credit ?? t('components.Queue.meta.unknownArtist') }}
|
|
||||||
</Pill>
|
|
||||||
</router-link>
|
|
||||||
<span>{{ ac.joinphrase }}</span>
|
|
||||||
</template>
|
|
||||||
</Layout>
|
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
v-if="currentTrack && errored"
|
v-if="currentTrack && errored"
|
||||||
|
|
|
@ -13,6 +13,7 @@ interface Props {
|
||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
|
// TODO: Fix getRoute
|
||||||
const getRoute = (ac: ArtistCredit) => {
|
const getRoute = (ac: ArtistCredit) => {
|
||||||
return {
|
return {
|
||||||
name: ac.artist.channel ? 'channels.detail' : 'library.artists.detail',
|
name: ac.artist.channel ? 'channels.detail' : 'library.artists.detail',
|
||||||
|
@ -32,6 +33,7 @@ const getRoute = (ac: ArtistCredit) => {
|
||||||
<router-link
|
<router-link
|
||||||
:to="{name: 'library.artists.detail', params: {id: ac.artist.id }}"
|
:to="{name: 'library.artists.detail', params: {id: ac.artist.id }}"
|
||||||
@click.stop.prevent=""
|
@click.stop.prevent=""
|
||||||
|
class="username"
|
||||||
>
|
>
|
||||||
<Pill>
|
<Pill>
|
||||||
<template #image>
|
<template #image>
|
||||||
|
@ -53,3 +55,9 @@ const getRoute = (ac: ArtistCredit) => {
|
||||||
</template>
|
</template>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
a.username {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { computed } from 'vue'
|
||||||
import { truncate } from '~/utils/filters'
|
import { truncate } from '~/utils/filters'
|
||||||
|
|
||||||
import Link from '~/components/ui/Link.vue'
|
import Link from '~/components/ui/Link.vue'
|
||||||
|
import Pill from '~/components/ui/Pill.vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
actor: Actor
|
actor: Actor
|
||||||
|
@ -54,29 +55,30 @@ const url = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Link
|
<router-link
|
||||||
:to="url"
|
:to="url"
|
||||||
:title="actor?.full_username"
|
|
||||||
class="username"
|
class="username"
|
||||||
:solid="!discrete"
|
@click.stop.prevent=""
|
||||||
:secondary="!discrete"
|
|
||||||
:round="!discrete"
|
|
||||||
>
|
>
|
||||||
<span class="center">
|
<Pill>
|
||||||
<actor-avatar
|
<template #image>
|
||||||
v-if="avatar"
|
<actor-avatar
|
||||||
:actor="actor"
|
v-if="avatar"
|
||||||
/>
|
:actor="actor"
|
||||||
<slot>{{ repr }}</slot>
|
/>
|
||||||
</span>
|
<i
|
||||||
</Link>
|
v-else
|
||||||
|
class="bi bi-person-circle"
|
||||||
|
style="font-size: 24px;"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
{{ repr }}
|
||||||
|
</Pill>
|
||||||
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
a.username {
|
a.username {
|
||||||
span.center {
|
text-decoration: none;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -334,8 +334,7 @@ watch(showDeleteModal, (newValue) => {
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<Layout flex>
|
<Layout flex gap-8>
|
||||||
<div>
|
|
||||||
<span v-if="track.attributed_to">
|
<span v-if="track.attributed_to">
|
||||||
{{ t('components.library.TrackBase.subtitle.with-uploader') }}
|
{{ t('components.library.TrackBase.subtitle.with-uploader') }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -354,8 +353,8 @@ watch(showDeleteModal, (newValue) => {
|
||||||
>
|
>
|
||||||
{{ momentFormat(new Date(track.creation_date), 'LL') }}
|
{{ momentFormat(new Date(track.creation_date), 'LL') }}
|
||||||
</time>
|
</time>
|
||||||
</div>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
<Spacer :size="32" />
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
v-if="isEmbedable"
|
v-if="isEmbedable"
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { useI18n } from 'vue-i18n'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
import Card from '~/components/ui/Card.vue'
|
import Card from '~/components/ui/Card.vue'
|
||||||
|
import Spacer from '~/components/ui/Spacer.vue'
|
||||||
import ActorLink from '~/components/common/ActorLink.vue'
|
import ActorLink from '~/components/common/ActorLink.vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -59,7 +60,7 @@ const goToPlaylist = () => {
|
||||||
|
|
||||||
const updatedTitle = computed(() => {
|
const updatedTitle = computed(() => {
|
||||||
const date = momentFormat(new Date(props.playlist.modification_date ?? '1970-01-01'))
|
const date = momentFormat(new Date(props.playlist.modification_date ?? '1970-01-01'))
|
||||||
return t('components.audio.PlaylistCard.title', { date })
|
return t('components.playlists.Card.title', { date })
|
||||||
})
|
})
|
||||||
const updatedAgo = computed(() => moment(props.playlist.modification_date).fromNow())
|
const updatedAgo = computed(() => moment(props.playlist.modification_date).fromNow())
|
||||||
</script>
|
</script>
|
||||||
|
@ -93,6 +94,7 @@ const updatedAgo = computed(() => moment(props.playlist.modification_date).fromN
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="playlist-meta">
|
<div class="playlist-meta">
|
||||||
<span>{{ t('vui.by-user') }}</span>
|
<span>{{ t('vui.by-user') }}</span>
|
||||||
|
<Spacer :size="8" />
|
||||||
<ActorLink
|
<ActorLink
|
||||||
:actor="playlist.actor"
|
:actor="playlist.actor"
|
||||||
:avatar="false"
|
:avatar="false"
|
||||||
|
|
|
@ -358,7 +358,8 @@ const current = computed(() => (
|
||||||
display: block;
|
display: block;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
outline: transparent;
|
outline: 0px transparent;
|
||||||
|
border: 0px;
|
||||||
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
|
@ -366,8 +367,8 @@ const current = computed(() => (
|
||||||
border-radius: 100vh;
|
border-radius: 100vh;
|
||||||
|
|
||||||
// Negative margins for increased interactive area; visual correction for rounded shape
|
// Negative margins for increased interactive area; visual correction for rounded shape
|
||||||
margin: -5px -7px;
|
margin: -4px -4px;
|
||||||
padding: 5px;
|
padding: 0px;
|
||||||
|
|
||||||
border-radius: 100vh;
|
border-radius: 100vh;
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,12 @@
|
||||||
},
|
},
|
||||||
"vui": {
|
"vui": {
|
||||||
"radio": "Radio",
|
"radio": "Radio",
|
||||||
"by-user": "by {'@'}{username}",
|
"by-user": "by {username}",
|
||||||
"go-to": "Go to",
|
"go-to": "Go to",
|
||||||
"pagination": {
|
"pagination": {
|
||||||
"previous": "Previous",
|
"label": "Pagination",
|
||||||
"next": "Next"
|
"previous": "Previous page",
|
||||||
|
"next": "Next page"
|
||||||
},
|
},
|
||||||
"albums": "{n} album | {n} albums",
|
"albums": "{n} album | {n} albums",
|
||||||
"tracks": "{n} track | {n} tracks",
|
"tracks": "{n} track | {n} tracks",
|
||||||
|
@ -2812,6 +2813,7 @@
|
||||||
},
|
},
|
||||||
"playlists": {
|
"playlists": {
|
||||||
"Card": {
|
"Card": {
|
||||||
|
"title": "Updated on {date}",
|
||||||
"meta": {
|
"meta": {
|
||||||
"tracks": "No tracks | {n} track | {n} tracks"
|
"tracks": "No tracks | {n} track | {n} tracks"
|
||||||
}
|
}
|
||||||
|
@ -2946,13 +2948,6 @@
|
||||||
"more": "Show 1 more tag | Show {n} more tags"
|
"more": "Show 1 more tag | Show {n} more tags"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"vui": {
|
|
||||||
"Pagination": {
|
|
||||||
"label": "Pagination",
|
|
||||||
"next": "Next Page",
|
|
||||||
"previous": "Previous Page"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"composables": {
|
"composables": {
|
||||||
|
|
|
@ -529,9 +529,6 @@
|
||||||
"previous": "Previous track"
|
"previous": "Previous track"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"PlaylistCard": {
|
|
||||||
"title": "Updated on {date}"
|
|
||||||
},
|
|
||||||
"Search": {
|
"Search": {
|
||||||
"empty": {
|
"empty": {
|
||||||
"noAlbums": "No album matched your query",
|
"noAlbums": "No album matched your query",
|
||||||
|
|
Loading…
Reference in New Issue