From db48108d21786eaa510d86d05afde318630ada0f Mon Sep 17 00:00:00 2001 From: CaIon Date: Tue, 28 Apr 2026 20:29:23 +0800 Subject: [PATCH] feat(logs): enhance usage logs table with log type indicators and improve UI elements --- .../components/data-table/column-header.tsx | 2 +- web/default/src/components/status-badge.tsx | 24 +- .../columns/common-logs-columns.tsx | 248 +++++++++++------- .../components/common-logs-filter-bar.tsx | 28 +- .../components/common-logs-stats.tsx | 12 +- .../components/usage-logs-table.tsx | 69 +++-- web/default/src/lib/format.ts | 1 - web/default/src/styles/theme.css | 90 +++---- 8 files changed, 289 insertions(+), 185 deletions(-) diff --git a/web/default/src/components/data-table/column-header.tsx b/web/default/src/components/data-table/column-header.tsx index 9b3e1f99..50da0e2a 100644 --- a/web/default/src/components/data-table/column-header.tsx +++ b/web/default/src/components/data-table/column-header.tsx @@ -19,7 +19,7 @@ import { type DataTableColumnHeaderProps = React.HTMLAttributes & { column: Column - title: string + title: React.ReactNode } export function DataTableColumnHeader({ diff --git a/web/default/src/components/status-badge.tsx b/web/default/src/components/status-badge.tsx index 557bc686..d638030c 100644 --- a/web/default/src/components/status-badge.tsx +++ b/web/default/src/components/status-badge.tsx @@ -69,7 +69,7 @@ export interface StatusBadgeProps extends Omit< children?: React.ReactNode icon?: LucideIcon pulse?: boolean - /** @deprecated Dot is always shown in flat design */ + /** When false, hides the leading dot */ showDot?: boolean variant?: StatusVariant | null size?: 'sm' | 'md' | 'lg' | null @@ -87,7 +87,7 @@ export function StatusBadge({ variant, size = 'sm', pulse = false, - showDot: _showDot, + showDot = true, rounded: _rounded, copyable = true, copyText, @@ -110,7 +110,7 @@ export function StatusBadge({ onClick?.(e) } - const content = children ?? (label ? {label} : null) + const content = children ?? (label ? {label} : null) return ( -