refactor(ui): Improve usage log filter responsiveness and mobile UX

Refactor the usage log filter toolbar into a shared reusable component for common, drawing, and task logs. Optimize desktop filters with a responsive grid, move secondary filters into a mobile drawer, standardize filter typography, remove redundant filter icons, and add the missing i18n translations for the new drawer description.
This commit is contained in:
t0ng7u
2026-05-25 05:35:44 +08:00
parent b302be30e3
commit 583da45296
79 changed files with 1879 additions and 1262 deletions
@@ -28,6 +28,7 @@ import {
import { DataTableColumnHeader } from '@/components/data-table'
import { MaskedValueDisplay } from '@/components/masked-value-display'
import { StatusBadge } from '@/components/status-badge'
import { TableId } from '@/components/table-id'
import { REDEMPTION_FILTER_EXPIRED, REDEMPTION_STATUSES } from '../constants'
import { isRedemptionExpired, isTimestampExpired } from '../lib'
import { type Redemption } from '../types'
@@ -66,7 +67,9 @@ export function useRedemptionsColumns(): ColumnDef<Redemption>[] {
<DataTableColumnHeader column={column} title={t('ID')} />
),
cell: ({ row }) => {
return <div className='w-[60px]'>{row.getValue('id')}</div>
return (
<TableId value={row.getValue('id') as number} className='w-[60px]' />
)
},
},
{
@@ -99,7 +102,6 @@ export function useRedemptionsColumns(): ColumnDef<Redemption>[] {
<StatusBadge
label={t('Expired')}
variant='warning'
showDot={true}
copyable={false}
/>
)
@@ -115,7 +117,6 @@ export function useRedemptionsColumns(): ColumnDef<Redemption>[] {
<StatusBadge
label={t(statusConfig.labelKey)}
variant={statusConfig.variant}
showDot={statusConfig.showDot}
copyable={false}
/>
)