fix(front): remove unused router redirections after moving ui modules to this repo #2355

This commit is contained in:
ArneBo 2025-02-14 10:22:01 +01:00
parent 7c094c83a2
commit cb4c879eda
4 changed files with 0 additions and 35 deletions

View File

@ -27,18 +27,9 @@ const props = defineProps<Props>()
const { album } = props
let navigate = (to: 'artist' | 'album') => {}
const artist_credit = album.artist_credit || []
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 imageUrl = computed(() => props.album.cover?.urls.original
? store.getters['instance/absoluteUrl'](props.album.cover?.urls.large_square_crop)

View File

@ -9,14 +9,6 @@ import Card from '~/components/ui/Card.vue'
const { podcast } = defineProps<{ podcast: Channel }>()
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>
<template>

View File

@ -17,13 +17,6 @@ const play = defineEmit<[radio: Radio]>()
const props = defineProps<Props & PastelProps>()
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>
<template>

View File

@ -22,17 +22,6 @@ const profileParams = computed(() => {
const [username, domain] = user.full_username.split('@')
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>
<template>