🎨 fix(logs): remove hardcoded font-mono to support global theme font inheritance
- Remove explicit 'font-mono' and custom size classes from model and token badges in usage logs. - Allow model name and token badges to naturally inherit the active theme's font family (Sans or Serif) and text size from the parent container. - Restore visual consistency and proportion across all table badge components.
This commit is contained in:
+6
-6
@@ -357,7 +357,7 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef<UsageLog>[] {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{log.channel_name && (
|
{log.channel_name && (
|
||||||
<span className='text-muted-foreground/70 truncate text-[11px]'>
|
<span className='text-muted-foreground/70 truncate !text-xs [font-family:var(--font-body)]'>
|
||||||
{channelName}
|
{channelName}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@@ -491,7 +491,7 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef<UsageLog>[] {
|
|||||||
copyText={sensitiveVisible ? tokenName : undefined}
|
copyText={sensitiveVisible ? tokenName : undefined}
|
||||||
size='sm'
|
size='sm'
|
||||||
showDot={false}
|
showDot={false}
|
||||||
className='border-border/60 bg-muted/30 text-foreground max-w-full overflow-hidden rounded-md border h-6 px-2 py-0.5 gap-1.5 font-mono'
|
className='border-border/60 bg-muted/30 text-foreground max-w-full overflow-hidden rounded-md border h-6 px-2 py-0.5 gap-1.5'
|
||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
{sensitiveVisible && tokenName.length > 16 && (
|
{sensitiveVisible && tokenName.length > 16 && (
|
||||||
@@ -502,7 +502,7 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef<UsageLog>[] {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</TooltipProvider>
|
</TooltipProvider>
|
||||||
{metaParts.length > 0 && (
|
{metaParts.length > 0 && (
|
||||||
<span className='text-muted-foreground/60 truncate text-[11px]'>
|
<span className='text-muted-foreground/60 truncate !text-xs [font-family:var(--font-body)]'>
|
||||||
{metaParts.join(' · ')}
|
{metaParts.join(' · ')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@@ -598,13 +598,13 @@ export function useCommonLogsColumns(isAdmin: boolean): ColumnDef<UsageLog>[] {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center gap-1 text-[11px]'>
|
<div className='flex items-center gap-1 !text-xs leading-none [font-family:var(--font-body)]'>
|
||||||
<span className='text-muted-foreground/60'>
|
<span className='text-muted-foreground/60 !text-xs leading-none [font-family:var(--font-body)]'>
|
||||||
{log.is_stream ? t('Stream') : t('Non-stream')}
|
{log.is_stream ? t('Stream') : t('Non-stream')}
|
||||||
{tokensPerSecond != null && (
|
{tokensPerSecond != null && (
|
||||||
<>
|
<>
|
||||||
{' · '}
|
{' · '}
|
||||||
<span className='font-mono tabular-nums'>
|
<span className='tabular-nums'>
|
||||||
{Math.round(tokensPerSecond)}
|
{Math.round(tokensPerSecond)}
|
||||||
</span>
|
</span>
|
||||||
{' t/s'}
|
{' t/s'}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ function ModelBadgeContent(props: ModelBadgeProps) {
|
|||||||
showDot={!provider}
|
showDot={!provider}
|
||||||
autoColor={provider ? undefined : props.modelName}
|
autoColor={provider ? undefined : props.modelName}
|
||||||
className={cn(
|
className={cn(
|
||||||
'border-border/60 bg-muted/30 h-auto min-h-6 px-2 py-0.5 gap-1.5 rounded-md border font-mono whitespace-normal break-all',
|
'border-border/60 bg-muted/30 h-auto min-h-6 px-2 py-0.5 gap-1.5 rounded-md border whitespace-normal break-all',
|
||||||
provider && 'text-foreground',
|
provider && 'text-foreground',
|
||||||
props.className
|
props.className
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user