chore(front): cleanup

This commit is contained in:
Flupsi 2025-06-06 19:32:02 +02:00
parent 5be004ca64
commit 65529429a6
4 changed files with 7 additions and 6 deletions

View File

@ -68,7 +68,7 @@ const performSearch = () => {
}
watch(
[() => store.state.moderation.lastUpdate, page],
() => [store.state.moderation.lastUpdate, page.value],
() => fetchData(),
{ immediate: true }
)

View File

@ -84,7 +84,7 @@ onMounted(() => {
})
watch(
[() => store.state.moderation.lastUpdate, page],
() => [store.state.moderation.lastUpdate, page.value],
() => fetchData(),
{ immediate: true }
)

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import type { Track, Artist, Library, ArtistCredit } from '~/types'
import type { Track, Library } from '~/types'
import { momentFormat } from '~/utils/filters'
import { computed, reactive, ref, watch } from 'vue'
@ -43,7 +43,7 @@ const props = defineProps<Props>()
const object = computed(() => dataStore.get("album", props.id).value)
const artistCredit = computed(() => object.value?.artist_credit ?? [])
const artist = computed(() => dataStore.get("artist", artistCredit.value[0].artist.id))
const libraries = ref([] as Library[])
const paginateBy = ref(50)
@ -131,7 +131,8 @@ const remove = async () => {
try {
await axios.delete(`albums/${object.value?.id}`)
emit('deleted')
router.push({ name: 'library.artists.detail', params: { id: artist.value?.id } })
if (artistCredit.value)
router.push({ name: 'library.artists.detail', params: { id: artistCredit.value[0].artist.id } })
} catch (error) {
useErrorHandler(error as Error)
}

View File

@ -61,7 +61,7 @@ const fetchData = async (url = props.url) => {
fetchData()
watch(
[() => store.state.moderation.lastUpdate, page],
() => [store.state.moderation.lastUpdate, page.value],
() => fetchData(),
{ immediate: true }
)