kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
chore(front): cleanup
rodzic
8cbee81149
commit
c68a2073b4
|
@ -67,7 +67,7 @@ const performSearch = () => {
|
|||
}
|
||||
|
||||
watch(
|
||||
[() => store.state.moderation.lastUpdate, page],
|
||||
() => [store.state.moderation.lastUpdate, page.value],
|
||||
() => fetchData(),
|
||||
{ immediate: true }
|
||||
)
|
||||
|
|
|
@ -83,7 +83,7 @@ onMounted(() => {
|
|||
})
|
||||
|
||||
watch(
|
||||
[() => store.state.moderation.lastUpdate, page],
|
||||
() => [store.state.moderation.lastUpdate, page.value],
|
||||
() => fetchData(),
|
||||
{ immediate: true }
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ const fetchData = async (url = props.url) => {
|
|||
fetchData()
|
||||
|
||||
watch(
|
||||
[() => store.state.moderation.lastUpdate, page],
|
||||
() => [store.state.moderation.lastUpdate, page.value],
|
||||
() => fetchData(),
|
||||
{ immediate: true }
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue