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
+3 -9
View File
@@ -79,12 +79,9 @@ export function getModelStatusOptions(t: TFunction) {
export function getModelStatusConfig(
t: TFunction
): Record<
ModelStatus,
{ label: string; variant: 'success' | 'neutral'; showDot?: boolean }
> {
): Record<ModelStatus, { label: string; variant: 'success' | 'neutral' }> {
return {
1: { label: t('Enabled'), variant: 'success', showDot: true },
1: { label: t('Enabled'), variant: 'success' },
0: { label: t('Disabled'), variant: 'neutral' },
}
}
@@ -122,11 +119,10 @@ export function getDeploymentStatusConfig(t: TFunction): Record<
{
label: string
variant: 'success' | 'neutral' | 'warning' | 'danger'
showDot?: boolean
}
> {
return {
running: { label: t('Running'), variant: 'success', showDot: true },
running: { label: t('Running'), variant: 'success' },
completed: { label: t('Completed'), variant: 'success' },
failed: { label: t('Failed'), variant: 'danger' },
error: { label: t('Failed'), variant: 'danger' },
@@ -134,12 +130,10 @@ export function getDeploymentStatusConfig(t: TFunction): Record<
'deployment requested': {
label: t('Deployment requested'),
variant: 'warning',
showDot: true,
},
'termination requested': {
label: t('Termination requested'),
variant: 'warning',
showDot: true,
},
}
}