Route analytics access through composable
This commit is contained in:
@@ -1376,14 +1376,14 @@ import DataPagination from '@/components/common/DataPagination.vue'
|
||||
import FileEditField from '@/components/common/FileEditField.vue'
|
||||
import BaseModal from '@/components/common/BaseModal.vue'
|
||||
import BaseButton from '@/components/common/BaseButton.vue'
|
||||
import { useAdminFiles, useInjectedDarkMode } from '@/composables'
|
||||
import { StatsService } from '@/services'
|
||||
import { useAdminFiles, useInjectedDarkMode, useTransferAnalytics } from '@/composables'
|
||||
import { formatFileSize, formatTimestamp } from '@/utils/common'
|
||||
|
||||
const { t } = useI18n()
|
||||
const isDarkMode = useInjectedDarkMode()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { fetchAnalytics } = useTransferAnalytics()
|
||||
|
||||
const fileTableHeaders = computed(() => [
|
||||
t('fileManage.headers.select'),
|
||||
@@ -1491,8 +1491,8 @@ const historyPageRows = computed(() => {
|
||||
const loadHistoryFiles = async () => {
|
||||
isHistoryLoading.value = true
|
||||
try {
|
||||
const response = await StatsService.getAnalytics()
|
||||
historyRows.value = response.detail?.historyFiles || []
|
||||
const analytics = await fetchAnalytics()
|
||||
historyRows.value = analytics?.historyFiles || []
|
||||
historyPage.value = 1
|
||||
} finally {
|
||||
isHistoryLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user