diff --git a/apps/frontend/src/components/ui/servers/FileItem.vue b/apps/frontend/src/components/ui/servers/FileItem.vue index f9f5453515..338d351181 100644 --- a/apps/frontend/src/components/ui/servers/FileItem.vue +++ b/apps/frontend/src/components/ui/servers/FileItem.vue @@ -237,7 +237,7 @@ function navigateToFolder() { const newPath = currentPath.endsWith('/') ? `${currentPath}${props.name}` : `${currentPath}/${props.name}` - router.push({ query: { path: newPath, page: 1 } }) + router.push({ query: { path: newPath } }) } const isNavigating = ref(false) diff --git a/packages/ui/src/components/servers/files/explorer/FileItem.vue b/packages/ui/src/components/servers/files/explorer/FileItem.vue index 4ae0ba024a..5ee3aa0479 100644 --- a/packages/ui/src/components/servers/files/explorer/FileItem.vue +++ b/packages/ui/src/components/servers/files/explorer/FileItem.vue @@ -239,7 +239,7 @@ function navigateToFolder() { const newPath = currentPath.endsWith('/') ? `${currentPath}${props.name}` : `${currentPath}/${props.name}` - router.push({ query: { path: newPath, page: 1 } }) + router.push({ query: { path: newPath } }) } const isNavigating = ref(false) diff --git a/packages/ui/src/pages/hosting/manage/files.vue b/packages/ui/src/pages/hosting/manage/files.vue index f57b569e1f..2fdbe27a02 100644 --- a/packages/ui/src/pages/hosting/manage/files.vue +++ b/packages/ui/src/pages/hosting/manage/files.vue @@ -424,8 +424,15 @@ const { return client.kyros.files_v0.listDirectory(currentPath.value, pageParam, 100) }, getNextPageParam: (lastPage, allPages) => { - const totalFetched = allPages.reduce((sum, page) => sum + page.items.length, 0) - return totalFetched < lastPage.total ? allPages.length + 1 : undefined + const pageSize = 100 + if (lastPage.items.length >= pageSize) { + return allPages.length + 1 + } + + if (lastPage.current < lastPage.total) { + return lastPage.current + 1 + } + return undefined }, staleTime: 30_000, initialPageParam: 1,