diff --git a/web/default/src/components/data-table/core/badge-cell.tsx b/web/default/src/components/data-table/core/badge-cell.tsx index 5de4c4bd..660baa6f 100644 --- a/web/default/src/components/data-table/core/badge-cell.tsx +++ b/web/default/src/components/data-table/core/badge-cell.tsx @@ -27,7 +27,7 @@ export function BadgeCell({ className, ...props }: BadgeCellProps) {
- }> + }> ({ row }: { row: Row }) { {label}
)} -
+
{renderCellContent(cell) ?? '-'} @@ -164,10 +164,7 @@ function FallbackContent({ row }: { row: Row }) { if (!label) { return ( -
+
{renderCellContent(cell)} @@ -183,7 +180,7 @@ function FallbackContent({ row }: { row: Row }) { {label} -
+
{renderCellContent(cell) ?? '-'} diff --git a/web/default/src/components/provider-badge.tsx b/web/default/src/components/provider-badge.tsx index 0f0d659c..09b0290d 100644 --- a/web/default/src/components/provider-badge.tsx +++ b/web/default/src/components/provider-badge.tsx @@ -50,7 +50,7 @@ export function ProviderBadge({ autoColor={colorText ? label : undefined} variant={colorText ? undefined : 'neutral'} size='sm' - className={cn('min-w-0 shrink overflow-hidden', !icon && 'pl-0')} + className='min-w-0 shrink overflow-hidden' {...badgeProps} />
diff --git a/web/default/src/components/status-badge.tsx b/web/default/src/components/status-badge.tsx index 61571d69..fd2e90f1 100644 --- a/web/default/src/components/status-badge.tsx +++ b/web/default/src/components/status-badge.tsx @@ -87,9 +87,9 @@ export const StatusBadgeTypeContext = React.createContext('badge') const sizeMap = { - sm: 'h-5 gap-1 px-1.5 text-sm leading-none', - md: 'h-5 gap-1 px-1.5 text-sm leading-none', - lg: 'h-6 gap-1.5 px-2 text-sm leading-none', + sm: 'h-5 gap-1 text-sm leading-none', + md: 'h-5 gap-1 text-sm leading-none', + lg: 'h-6 gap-1.5 text-sm leading-none', } as const const textSizeMap = { diff --git a/web/default/src/features/channels/components/channel-card.tsx b/web/default/src/features/channels/components/channel-card.tsx index 1dabb1c6..7198b5e2 100644 --- a/web/default/src/features/channels/components/channel-card.tsx +++ b/web/default/src/features/channels/components/channel-card.tsx @@ -159,7 +159,7 @@ function ChannelCardComponent({ {/* Last row: groups span the full width, showing every group (no label) */}
{groups.length > 0 ? ( -
+
{groups.map((g) => ( } /> @@ -435,7 +435,7 @@ function BalanceCell({ channel }: { channel: Channel }) { return ( -
+
) } @@ -846,7 +845,6 @@ export function useChannelsColumns( variant='success' size='sm' copyable={false} - className='-ml-1.5' /> ) } else { @@ -856,7 +854,6 @@ export function useChannelsColumns( variant='neutral' size='sm' copyable={false} - className='-ml-1.5' /> ) } @@ -1025,14 +1022,7 @@ export function useChannelsColumns( return - } - return ( - - ) + return }, size: 120, enableSorting: false, @@ -1080,7 +1070,6 @@ export function useChannelsColumns( variant={config.variant} size='sm' copyable={false} - className='-ml-1.5' /> ) }, @@ -1114,7 +1103,7 @@ export function useChannelsColumns( variant='neutral' size='sm' copyable={false} - className='-ml-1.5 cursor-pointer' + className='cursor-pointer' /> } /> diff --git a/web/default/src/features/keys/components/api-keys-cells.tsx b/web/default/src/features/keys/components/api-keys-cells.tsx index 4195cb5d..9a6827b5 100644 --- a/web/default/src/features/keys/components/api-keys-cells.tsx +++ b/web/default/src/features/keys/components/api-keys-cells.tsx @@ -36,7 +36,7 @@ import { } from '@/components/ui/tooltip' import { copyToClipboard } from '@/lib/copy-to-clipboard' -import { type ApiKey } from '../types' +import type { ApiKey } from '../types' import { useApiKeys } from './api-keys-provider' export function ApiKeyCell({ apiKey }: { apiKey: ApiKey }) { @@ -54,6 +54,19 @@ export function ApiKeyCell({ apiKey }: { apiKey: ApiKey }) { const resolvedFullKey = resolvedKeys[apiKey.id] const isCopied = copiedKeyId === apiKey.id const maskedKey = `sk-${apiKey.key}` + let copyIcon = + if (isLoading) { + copyIcon = + } else if (isCopied) { + copyIcon = + } + + let copyTooltip = t('Copy API key') + if (isLoading) { + copyTooltip = t('Loading...') + } else if (isCopied) { + copyTooltip = t('Copied!') + } const handlePopoverOpen = useCallback( (open: boolean) => { @@ -135,21 +148,9 @@ export function ApiKeyCell({ apiKey }: { apiKey: ApiKey }) { /> } > - {isLoading ? ( - - ) : isCopied ? ( - - ) : ( - - )} + {copyIcon} - - {isLoading - ? t('Loading...') - : isCopied - ? t('Copied!') - : t('Copy API key')} - + {copyTooltip}
) @@ -160,12 +161,7 @@ export function ModelLimitsCell({ apiKey }: { apiKey: ApiKey }) { if (!apiKey.model_limits_enabled || !apiKey.model_limits) { return ( - + ) } @@ -203,7 +199,6 @@ export function IpRestrictionsCell({ apiKey }: { apiKey: ApiKey }) { label={t('No restriction')} variant='neutral' copyable={false} - className='-ml-1.5' /> ) } diff --git a/web/default/src/features/keys/components/api-keys-columns.tsx b/web/default/src/features/keys/components/api-keys-columns.tsx index 6c553873..8ae642b8 100644 --- a/web/default/src/features/keys/components/api-keys-columns.tsx +++ b/web/default/src/features/keys/components/api-keys-columns.tsx @@ -17,7 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import { useQuery } from '@tanstack/react-query' -import { type ColumnDef } from '@tanstack/react-table' +import type { ColumnDef } from '@tanstack/react-table' import { useTranslation } from 'react-i18next' import { BadgeCell, TruncatedCell } from '@/components/data-table' @@ -35,7 +35,7 @@ import { formatQuota, formatTimestampToDate } from '@/lib/format' import { cn } from '@/lib/utils' import { API_KEY_STATUSES } from '../constants' -import { type ApiKey } from '../types' +import type { ApiKey } from '../types' import { ApiKeyCell, ModelLimitsCell, @@ -116,7 +116,6 @@ export function useApiKeysColumns(): ColumnDef[] { label={t(statusConfig.label)} variant={statusConfig.variant} copyable={false} - className='-ml-1.5' /> ) }, @@ -144,7 +143,6 @@ export function useApiKeysColumns(): ColumnDef[] { label={t('Unlimited')} variant='neutral' copyable={false} - className='-ml-1.5' /> ) } @@ -224,7 +222,6 @@ export function useApiKeysColumns(): ColumnDef[] { } return ( @@ -292,7 +289,6 @@ export function useApiKeysColumns(): ColumnDef[] { label={t('Never')} variant='neutral' copyable={false} - className='-ml-1.5' /> ) } diff --git a/web/default/src/features/models/components/deployments-columns.tsx b/web/default/src/features/models/components/deployments-columns.tsx index 9209a73d..c5612629 100644 --- a/web/default/src/features/models/components/deployments-columns.tsx +++ b/web/default/src/features/models/components/deployments-columns.tsx @@ -74,7 +74,7 @@ export function useDeploymentsColumns(opts: { variant='neutral' copyText={name} size='sm' - className='-ml-1.5 font-mono' + className='font-mono' /> ) }, @@ -98,7 +98,6 @@ export function useDeploymentsColumns(opts: { variant={config.variant} size='sm' copyable={false} - className='-ml-1.5' /> ) }, @@ -130,7 +129,6 @@ export function useDeploymentsColumns(opts: { autoColor={String(provider)} size='sm' copyable={false} - className='-ml-1.5' /> ) }, diff --git a/web/default/src/features/models/components/models-columns.tsx b/web/default/src/features/models/components/models-columns.tsx index 61afe555..b51619ae 100644 --- a/web/default/src/features/models/components/models-columns.tsx +++ b/web/default/src/features/models/components/models-columns.tsx @@ -16,7 +16,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ -import { type ColumnDef } from '@tanstack/react-table' +import type { ColumnDef } from '@tanstack/react-table' import { useTranslation } from 'react-i18next' import { BadgeCell, BadgeListCell } from '@/components/data-table' @@ -139,7 +139,7 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { variant='neutral' copyText={name} size='sm' - className='-ml-1.5 font-mono' + className='font-mono' /> ) }, @@ -172,7 +172,6 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { | 'info' } size='sm' - className='-ml-1.5' /> ) @@ -182,16 +181,14 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { model.matched_models && model.matched_models.length > 0 ) { - const matchedBadges = model.matched_models.map((m, idx) => ( - + const matchedBadges = model.matched_models.map((m) => ( + )) return ( - }> - {badge} - + }>{badge} [] { variant={config.variant} size='sm' copyable={false} - className='-ml-1.5' /> ) }, @@ -293,8 +289,8 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { const tagArray = parseModelTags(tags) return ( ( - + items={tagArray.map((tag) => ( + ))} /> ) @@ -313,8 +309,8 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { const endpointArray = formatEndpointsDisplay(endpoints) return ( ( - + items={endpointArray.map((ep) => ( + ))} /> ) @@ -337,9 +333,9 @@ export function useModelsColumns(vendors: Vendor[] = []): ColumnDef[] { }> return ( ( + items={(channels ?? []).map((c) => ( [] { const quotaTypes = row.getValue('quota_types') as number[] return ( { + items={(quotaTypes ?? []).map((qt) => { const config = QUOTA_TYPE_CONFIG[qt] return ( [] { variant={syncOfficial === 1 ? 'success' : 'warning'} size='sm' copyable={false} - className='-ml-1.5' /> ) }, diff --git a/web/default/src/features/pricing/components/pricing-columns.tsx b/web/default/src/features/pricing/components/pricing-columns.tsx index b298e6d9..e288849d 100644 --- a/web/default/src/features/pricing/components/pricing-columns.tsx +++ b/web/default/src/features/pricing/components/pricing-columns.tsx @@ -104,7 +104,6 @@ export function usePricingColumns( label={isTokenBased ? t('Token') : t('Request')} variant={isTokenBased ? 'info' : 'neutral'} copyable={false} - className='-ml-1.5' /> ) }, diff --git a/web/default/src/features/redemption-codes/components/redemptions-columns.tsx b/web/default/src/features/redemption-codes/components/redemptions-columns.tsx index 73da30b2..d99e0525 100644 --- a/web/default/src/features/redemption-codes/components/redemptions-columns.tsx +++ b/web/default/src/features/redemption-codes/components/redemptions-columns.tsx @@ -16,7 +16,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ -import { type ColumnDef } from '@tanstack/react-table' +import type { ColumnDef } from '@tanstack/react-table' import { useTranslation } from 'react-i18next' import { MaskedValueDisplay } from '@/components/masked-value-display' @@ -32,7 +32,7 @@ import { formatQuota, formatTimestampToDate } from '@/lib/format' import { REDEMPTION_FILTER_EXPIRED, REDEMPTION_STATUSES } from '../constants' import { isRedemptionExpired, isTimestampExpired } from '../lib' -import { type Redemption } from '../types' +import type { Redemption } from '../types' import { DataTableRowActions } from './data-table-row-actions' export function useRedemptionsColumns(): ColumnDef[] { @@ -96,7 +96,6 @@ export function useRedemptionsColumns(): ColumnDef[] { label={t('Expired')} variant='warning' copyable={false} - className='-ml-1.5' /> ) } @@ -112,7 +111,6 @@ export function useRedemptionsColumns(): ColumnDef[] { label={t(statusConfig.labelKey)} variant={statusConfig.variant} copyable={false} - className='-ml-1.5' /> ) }, @@ -164,7 +162,6 @@ export function useRedemptionsColumns(): ColumnDef[] { label={formatQuota(quota)} variant='neutral' copyable={false} - className='-ml-1.5' /> ) }, @@ -195,7 +192,6 @@ export function useRedemptionsColumns(): ColumnDef[] { label={t('Never')} variant='neutral' copyable={false} - className='-ml-1.5' /> ) } @@ -233,7 +229,7 @@ export function useRedemptionsColumns(): ColumnDef[] { className='cursor-help' /> } - > + />
diff --git a/web/default/src/features/subscriptions/components/subscriptions-columns.tsx b/web/default/src/features/subscriptions/components/subscriptions-columns.tsx index a23148ba..a9f5a231 100644 --- a/web/default/src/features/subscriptions/components/subscriptions-columns.tsx +++ b/web/default/src/features/subscriptions/components/subscriptions-columns.tsx @@ -16,7 +16,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ -import { type ColumnDef } from '@tanstack/react-table' +import type { ColumnDef } from '@tanstack/react-table' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' @@ -118,14 +118,12 @@ export function useSubscriptionsColumns(): ColumnDef[] { label={t('Enable')} variant='success' copyable={false} - className='-ml-1.5' /> ) : ( ), size: 80, diff --git a/web/default/src/features/system-settings/models/model-ratio-table-columns.tsx b/web/default/src/features/system-settings/models/model-ratio-table-columns.tsx index df4aa9dc..81333f56 100644 --- a/web/default/src/features/system-settings/models/model-ratio-table-columns.tsx +++ b/web/default/src/features/system-settings/models/model-ratio-table-columns.tsx @@ -113,7 +113,6 @@ export function buildModelRatioColumns({ variant={getModeVariant(row.original.billingMode)} copyable={false} showDot={false} - className='-ml-1.5 px-0' /> ), filterFn: (row, id, value) => diff --git a/web/default/src/features/usage-logs/components/columns/drawing-logs-columns.tsx b/web/default/src/features/usage-logs/components/columns/drawing-logs-columns.tsx index 2b108513..6a23ea14 100644 --- a/web/default/src/features/usage-logs/components/columns/drawing-logs-columns.tsx +++ b/web/default/src/features/usage-logs/components/columns/drawing-logs-columns.tsx @@ -129,7 +129,6 @@ export function useDrawingLogsColumns( icon={getDrawingTypeIcon(action)} size='sm' copyable={false} - className='-ml-1.5' /> ) }, @@ -181,7 +180,6 @@ export function useDrawingLogsColumns( variant={mjSubmitResultMapper.getVariant(String(code))} size='sm' copyable={false} - className='-ml-1.5' /> ) }, diff --git a/web/default/src/features/usage-logs/components/columns/task-logs-columns.tsx b/web/default/src/features/usage-logs/components/columns/task-logs-columns.tsx index 24836e62..95520ec0 100644 --- a/web/default/src/features/usage-logs/components/columns/task-logs-columns.tsx +++ b/web/default/src/features/usage-logs/components/columns/task-logs-columns.tsx @@ -207,7 +207,6 @@ export function useTaskLogsColumns(isAdmin: boolean): ColumnDef[] { variant={taskStatusMapper.getVariant(status)} size='sm' copyable={false} - className='-ml-1.5' /> ) }, diff --git a/web/default/src/features/users/components/users-columns.tsx b/web/default/src/features/users/components/users-columns.tsx index 964132e5..986adcfc 100644 --- a/web/default/src/features/users/components/users-columns.tsx +++ b/web/default/src/features/users/components/users-columns.tsx @@ -145,7 +145,7 @@ export function useUsersColumns(): ColumnDef[] { return ( - }> + }> [] { label={t('No Quota')} variant='neutral' copyable={false} - className='-ml-1.5' /> ) }