mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-26 01:34:51 +08:00
fix(usage): tighten request log column spacing
The request log has more columns than the other usage tables, so at the default window size the last column (first token) was cut off and the table had to scroll sideways. Its columns are already sized to their content, so the model column had no slack to give back. Narrow the gaps for this table only: 16px between columns (was 24px) and 32px between column groups (was 40px), keeping the 16px outer edges. The table shrinks by 72px with the same rows; model names are not truncated. The provider, model and pricing tables keep their spacing.
This commit is contained in:
1 parent
50e091b055
commit
e53ca7e820
2 files changed
+7
-2
No files matched your search
@@ -619,7 +619,8 @@ export function RequestLogTable({
|
||||
key: id,
|
||||
className: cn(
|
||||
cells[id].props.className,
|
||||
groupBreaks.has(id) && usageTable.groupGap,
|
||||
usageTable.denseCell,
|
||||
groupBreaks.has(id) && usageTable.denseGroupGap,
|
||||
pin.className,
|
||||
),
|
||||
style: pin.style,
|
||||
@@ -671,7 +672,8 @@ export function RequestLogTable({
|
||||
ref={index === 0 ? firstHeadRef : undefined}
|
||||
className={cn(
|
||||
usageTable.th,
|
||||
groupBreaks.has(id) && usageTable.groupGap,
|
||||
usageTable.denseCell,
|
||||
groupBreaks.has(id) && usageTable.denseGroupGap,
|
||||
pin.className,
|
||||
)}
|
||||
style={pin.style}
|
||||
|
||||
@@ -23,6 +23,9 @@ export const usageTable = {
|
||||
td: "whitespace-nowrap px-3 first:ps-4 last:pe-4",
|
||||
/** 列组之间多留的间距(请求日志按身份 / 成本 / Tokens / 性能分组):组内列距 24px,换组处 40px */
|
||||
groupGap: "ps-7",
|
||||
/** 请求日志列多,收紧一档:组内列距 16px,换组处 32px(叠在 th / td / groupGap 之后,首尾 16px 不变) */
|
||||
denseCell: "px-2 first:ps-4 last:pe-4",
|
||||
denseGroupGap: "ps-6",
|
||||
mono: "font-mono text-caption",
|
||||
muted: "text-fg-3",
|
||||
empty: "py-10 text-center text-body text-fg-3",
|
||||
|
||||
Reference in new issue
Block a user