feat(ui): improve table controls and analytics filters

This commit is contained in:
CaIon
2026-04-30 13:57:10 +08:00
parent 8bff691089
commit 8f3c41ae77
35 changed files with 858 additions and 472 deletions
@@ -246,7 +246,7 @@ export function UsageLogsFilterDialog({
<FilterInput
id='mjId'
label={t('Task ID')}
placeholder={t('Filter by Midjourney task ID')}
placeholder={t('Filter by task ID')}
value={drawingFilters.mjId || ''}
onChange={(value) => handleChange('mjId', value)}
/>
@@ -27,7 +27,6 @@ import {
} from '@/components/ui/table'
import {
DataTablePagination,
DataTableToolbar,
DataTableViewOptions,
TableSkeleton,
TableEmpty,
@@ -40,6 +39,7 @@ import { fetchLogsByCategory } from '../lib/utils'
import type { LogCategory } from '../types'
import { CommonLogsFilterBar } from './common-logs-filter-bar'
import { CommonLogsStats } from './common-logs-stats'
import { TaskLogsFilterBar } from './task-logs-filter-bar'
const route = getRouteApi('/_authenticated/usage-logs/$section')
@@ -194,11 +194,12 @@ export function UsageLogsTable({ logCategory }: UsageLogsTableProps) {
/>
</div>
) : (
<DataTableToolbar
table={table}
filters={[]}
customSearch={null}
/>
<div className='rounded-md border bg-card/50 p-3 shadow-xs'>
<TaskLogsFilterBar
logCategory={logCategory}
viewOptions={<DataTableViewOptions table={table} />}
/>
</div>
)}
{isMobile ? (
<MobileCardList
-6
View File
@@ -7,7 +7,6 @@ import { SectionPageLayout } from '@/components/layout'
import type { NavGroup } from '@/components/layout/types'
import { CacheStatsDialog } from '@/features/system-settings/general/channel-affinity/cache-stats-dialog'
import { UserInfoDialog } from './components/dialogs/user-info-dialog'
import { UsageLogsPrimaryButtons } from './components/usage-logs-primary-buttons'
import {
UsageLogsProvider,
useUsageLogsContext,
@@ -105,11 +104,6 @@ function UsageLogsContent() {
<SectionPageLayout.Description>
{t(pageMeta.descriptionKey)}
</SectionPageLayout.Description>
<SectionPageLayout.Actions>
{activeCategory !== 'common' && (
<UsageLogsPrimaryButtons logCategory={activeCategory} />
)}
</SectionPageLayout.Actions>
<SectionPageLayout.Content>
<div className='space-y-4'>
{showTaskSwitcher && (