kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
fix(ui): repair reactivity on search fieds in moderation views when on first page
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2304>environments/review-docs-1664-292dbg/deployments/16508
rodzic
1b6de47a4f
commit
fb87d3141a
|
@ -100,10 +100,16 @@ const fetchData = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
watchDebounced(query, () => (page.value = 1), { debounce: 300 })
|
||||
const forceFetchFirstPage = async () => {
|
||||
page.value = 1
|
||||
return fetchData()
|
||||
}
|
||||
|
||||
watchDebounced(query, forceFetchFirstPage, { debounce: 300 })
|
||||
onOrderingUpdate(forceFetchFirstPage)
|
||||
watch(allowed, forceFetchFirstPage)
|
||||
|
||||
watch(page, fetchData)
|
||||
watch(allowed, fetchData)
|
||||
onOrderingUpdate(fetchData)
|
||||
fetchData()
|
||||
|
||||
const sharedLabels = useSharedLabels()
|
||||
|
|
|
@ -31,6 +31,7 @@ const submit = async () => {
|
|||
try {
|
||||
const response = await axios.post('manage/users/invitations/', { code: code.value })
|
||||
invitations.unshift(response.data)
|
||||
code.value = ''
|
||||
} catch (error) {
|
||||
errors.value = (error as BackendError).backendErrors
|
||||
}
|
||||
|
|
|
@ -81,10 +81,16 @@ const fetchData = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
watchDebounced(query, () => (page.value = 1), { debounce: 300 })
|
||||
watch(isOpen, () => (page.value = 1))
|
||||
const forceFetchFirstPage = async () => {
|
||||
page.value = 1
|
||||
return fetchData()
|
||||
}
|
||||
|
||||
watchDebounced(query, forceFetchFirstPage, { debounce: 300 })
|
||||
onOrderingUpdate(forceFetchFirstPage)
|
||||
watch(isOpen, forceFetchFirstPage)
|
||||
|
||||
watch(page, fetchData)
|
||||
onOrderingUpdate(fetchData)
|
||||
fetchData()
|
||||
|
||||
const sharedLabels = useSharedLabels()
|
||||
|
@ -182,7 +188,7 @@ const labels = computed(() => ({
|
|||
#row-cells="scope"
|
||||
>
|
||||
<td>
|
||||
<router-link :to="{name: 'manage.users.users.detail', params: {id: scope.obj.id }}">
|
||||
<router-link :to="{name: 'manage.moderation.accounts.detail', params: {id: scope.obj.id }}">
|
||||
{{ scope.obj.owner.username }}
|
||||
</router-link>
|
||||
</td>
|
||||
|
|
|
@ -84,9 +84,15 @@ const fetchData = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
watchDebounced(query, () => (page.value = 1), { debounce: 300 })
|
||||
const forceFetchFirstPage = async () => {
|
||||
page.value = 1
|
||||
return fetchData()
|
||||
}
|
||||
|
||||
watchDebounced(query, forceFetchFirstPage, { debounce: 300 })
|
||||
onOrderingUpdate(forceFetchFirstPage)
|
||||
|
||||
watch(page, fetchData)
|
||||
onOrderingUpdate(fetchData)
|
||||
fetchData()
|
||||
|
||||
const sharedLabels = useSharedLabels()
|
||||
|
|
|
@ -3033,29 +3033,29 @@
|
|||
"filters": {
|
||||
"creationDate": "Creation date",
|
||||
"releaseDate": "Release date",
|
||||
"accessedDate": "'Accessed date",
|
||||
"appliedDate": "'Applied date",
|
||||
"handledDate": "'Handled date",
|
||||
"firstSeen": "'First seen date",
|
||||
"lastSeen": "'Last seen date",
|
||||
"modificationDate": "'Modification date",
|
||||
"expirationDate": "'Expiration date",
|
||||
"trackTitle": "'Track name",
|
||||
"albumTitle": "'Album name",
|
||||
"artistName": "'Artist name",
|
||||
"name": "'Name",
|
||||
"itemsCount": "'Items",
|
||||
"size": "'Size",
|
||||
"bitrate": "'Bitrate",
|
||||
"duration": "'Duration",
|
||||
"dateJoined": "'Sign-up date",
|
||||
"lastActivity": "'Last activity",
|
||||
"username": "'Username",
|
||||
"domain": "'Domaimn",
|
||||
"users": "'Users",
|
||||
"receivedMessages": "'Received messages",
|
||||
"uploads": "'Uploads",
|
||||
"followers": "'Followers"
|
||||
"accessedDate": "Accessed date",
|
||||
"appliedDate": "Applied date",
|
||||
"handledDate": "Handled date",
|
||||
"firstSeen": "First seen date",
|
||||
"lastSeen": "Last seen date",
|
||||
"modificationDate": "Modification date",
|
||||
"expirationDate": "Expiration date",
|
||||
"trackTitle": "Track name",
|
||||
"albumTitle": "Album name",
|
||||
"artistName": "Artist name",
|
||||
"name": "Name",
|
||||
"itemsCount": "Items",
|
||||
"size": "Size",
|
||||
"bitrate": "Bitrate",
|
||||
"duration": "Duration",
|
||||
"dateJoined": "Sign-up date",
|
||||
"lastActivity": "Last activity",
|
||||
"username": "Username",
|
||||
"domain": "Domaimn",
|
||||
"users": "Users",
|
||||
"receivedMessages": "Received messages",
|
||||
"uploads": "Uploads",
|
||||
"followers": "Followers"
|
||||
},
|
||||
"scopes": {
|
||||
"profile": {
|
||||
|
|
Ładowanie…
Reference in New Issue