kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix router navigation
rodzic
a28e00708b
commit
33dfeea168
|
@ -14,7 +14,7 @@ export default (orderingConfigName: MaybeRef<RouteWithPreferences | null>) => {
|
|||
|
||||
const config = reactiveComputed(() => {
|
||||
const name = unref(orderingConfigName) ?? route.name as RouteWithPreferences
|
||||
return store.state.ui.routePreferences[name]
|
||||
return { ...store.state.ui.routePreferences[name] }
|
||||
})
|
||||
|
||||
const { paginateBy, ordering, orderingDirection } = toRefs(config)
|
||||
|
@ -29,7 +29,10 @@ export default (orderingConfigName: MaybeRef<RouteWithPreferences | null>) => {
|
|||
field: (str[0] === '-' || str[0] === '+' ? str.slice(1) : str) as OrderingField
|
||||
})
|
||||
|
||||
const onOrderingUpdate = (fn: () => void) => watch(config, fn)
|
||||
const onOrderingUpdate = (fn: () => void) => {
|
||||
const stop = watch(config, fn)
|
||||
return stop
|
||||
}
|
||||
|
||||
return {
|
||||
paginateBy,
|
||||
|
|
|
@ -673,9 +673,7 @@ export default createRouter({
|
|||
path: 'podcasts/',
|
||||
name: 'library.podcasts.browse',
|
||||
component: () =>
|
||||
import(
|
||||
'~/components/library/Podcasts.vue'
|
||||
),
|
||||
import('~/components/library/Podcasts.vue'),
|
||||
props: route => ({
|
||||
defaultOrdering: route.query.ordering,
|
||||
defaultQuery: route.query.query,
|
||||
|
|
Ładowanie…
Reference in New Issue