kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
chore(front): cleanup
rodzic
8cbee81149
commit
c68a2073b4
|
@ -67,7 +67,7 @@ const performSearch = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => store.state.moderation.lastUpdate, page],
|
() => [store.state.moderation.lastUpdate, page.value],
|
||||||
() => fetchData(),
|
() => fetchData(),
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
|
@ -83,7 +83,7 @@ onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => store.state.moderation.lastUpdate, page],
|
() => [store.state.moderation.lastUpdate, page.value],
|
||||||
() => fetchData(),
|
() => fetchData(),
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Track, Artist, Library, ArtistCredit } from '~/types'
|
import type { Track, Library } from '~/types'
|
||||||
|
|
||||||
import { momentFormat } from '~/utils/filters'
|
import { momentFormat } from '~/utils/filters'
|
||||||
import { computed, reactive, ref, watch } from 'vue'
|
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 object = computed(() => dataStore.get("album", props.id).value)
|
||||||
const artistCredit = computed(() => object.value?.artist_credit ?? [])
|
const artistCredit = computed(() => object.value?.artist_credit ?? [])
|
||||||
const artist = computed(() => dataStore.get("artist", artistCredit.value[0].artist.id))
|
|
||||||
|
|
||||||
const libraries = ref([] as Library[])
|
const libraries = ref([] as Library[])
|
||||||
const paginateBy = ref(50)
|
const paginateBy = ref(50)
|
||||||
|
@ -131,7 +131,8 @@ const remove = async () => {
|
||||||
try {
|
try {
|
||||||
await axios.delete(`albums/${object.value?.id}`)
|
await axios.delete(`albums/${object.value?.id}`)
|
||||||
emit('deleted')
|
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) {
|
} catch (error) {
|
||||||
useErrorHandler(error as Error)
|
useErrorHandler(error as Error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ const fetchData = async (url = props.url) => {
|
||||||
fetchData()
|
fetchData()
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[() => store.state.moderation.lastUpdate, page],
|
() => [store.state.moderation.lastUpdate, page.value],
|
||||||
() => fetchData(),
|
() => fetchData(),
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue