fix(front): remove unused router redirections after moving ui modules to this repo #2355
This commit is contained in:
parent
7c094c83a2
commit
cb4c879eda
|
@ -27,18 +27,9 @@ const props = defineProps<Props>()
|
||||||
|
|
||||||
const { album } = props
|
const { album } = props
|
||||||
|
|
||||||
let navigate = (to: 'artist' | 'album') => {}
|
|
||||||
|
|
||||||
const artist_credit = album.artist_credit || []
|
const artist_credit = album.artist_credit || []
|
||||||
const firstArtist = artist_credit.length > 0 ? artist_credit[0].artist : null
|
const firstArtist = artist_credit.length > 0 ? artist_credit[0].artist : null
|
||||||
|
|
||||||
if (import.meta.env.PROD) {
|
|
||||||
const router = useRouter()
|
|
||||||
navigate = (to: 'artist' | 'album') => to === 'album'
|
|
||||||
? router.push({ name: 'library.albums.detail', params: { id: album.id } })
|
|
||||||
: router.push({ name: 'library.artists.detail', params: { id: firstArtist?.id } })
|
|
||||||
}
|
|
||||||
|
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const imageUrl = computed(() => props.album.cover?.urls.original
|
const imageUrl = computed(() => props.album.cover?.urls.original
|
||||||
? store.getters['instance/absoluteUrl'](props.album.cover?.urls.large_square_crop)
|
? store.getters['instance/absoluteUrl'](props.album.cover?.urls.large_square_crop)
|
||||||
|
|
|
@ -9,14 +9,6 @@ import Card from '~/components/ui/Card.vue'
|
||||||
const { podcast } = defineProps<{ podcast: Channel }>()
|
const { podcast } = defineProps<{ podcast: Channel }>()
|
||||||
|
|
||||||
const timeAgo = useTimeAgo(new Date(podcast.artist?.modification_date ?? new Date()))
|
const timeAgo = useTimeAgo(new Date(podcast.artist?.modification_date ?? new Date()))
|
||||||
|
|
||||||
let navigate = () => {}
|
|
||||||
|
|
||||||
if (import.meta.env.PROD) {
|
|
||||||
const router = useRouter()
|
|
||||||
navigate = () => router.push({ name: 'library.artists.detail', params: { id: podcast.artist?.id } })
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -17,13 +17,6 @@ const play = defineEmit<[radio: Radio]>()
|
||||||
const props = defineProps<Props & PastelProps>()
|
const props = defineProps<Props & PastelProps>()
|
||||||
|
|
||||||
const pastel = usePastel(() => props.color)
|
const pastel = usePastel(() => props.color)
|
||||||
|
|
||||||
let navigate = () => {}
|
|
||||||
|
|
||||||
if (import.meta.env.PROD) {
|
|
||||||
const router = useRouter()
|
|
||||||
navigate = () => router.push({ name: 'library.radios.detail', params: { id: props.radio.id } })
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -22,17 +22,6 @@ const profileParams = computed(() => {
|
||||||
const [username, domain] = user.full_username.split('@')
|
const [username, domain] = user.full_username.split('@')
|
||||||
return { username, domain }
|
return { username, domain }
|
||||||
})
|
})
|
||||||
|
|
||||||
let navigate = (to: 'track' | 'artist' | 'user') => { }
|
|
||||||
|
|
||||||
if (import.meta.env.PROD) {
|
|
||||||
const router = useRouter()
|
|
||||||
navigate = (to: 'track' | 'artist' | 'user') => to === 'track'
|
|
||||||
? router.push({ name: 'library.tracks.detail', params: { id: track.id } })
|
|
||||||
: to === 'artist'
|
|
||||||
? router.push({ name: 'library.artists.detail', params: { id: firstArtist?.id } /* TODO: Multi-Artist! */ })
|
|
||||||
: router.push({ name: 'profile.full', params: profileParams.value })
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
Loading…
Reference in New Issue