Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
48532ae
fix(ui): 修复服务商表单小屏底部导航遮挡提交按钮
tesgth032 Feb 23, 2026
d70d66d
test(vitest): 修复 node 内置模块 mock 并限制默认 worker 数
tesgth032 Feb 23, 2026
c9b77fe
fix(ui): 补齐 safe-area-bottom 并修正表单进度条
tesgth032 Feb 23, 2026
884340e
test(e2e): 通过登录换取会话 token
tesgth032 Feb 23, 2026
68a6553
test(e2e): 登录获取会话 token 增加重试
tesgth032 Feb 23, 2026
b9f1ebf
fix(redis): CI 环境允许连接 Redis
tesgth032 Feb 23, 2026
6887c5b
fix(ui): 移动端 dvh 视口高度与安全区适配
tesgth032 Feb 23, 2026
4886ad1
fix(e2e): 登录重试仅覆盖可重试错误
tesgth032 Feb 23, 2026
7f8d184
fix(redis): 连接终止后重置单例避免僵尸客户端
tesgth032 Feb 23, 2026
e7a9136
fix(ui,redis): safe-area 作用域与 Redis 配置复用
tesgth032 Feb 23, 2026
674c55c
fix(ui,redis): dvh 自适应与 closeRedis 守卫
tesgth032 Feb 23, 2026
e88440a
fix(ui,i18n,redis): 修复 max-h/i18n 与 closeRedis
tesgth032 Feb 23, 2026
6265bdc
fix(ui,test,a11y): 补齐小屏体验与单测稳定性
tesgth032 Feb 23, 2026
cc61d09
fix(ui,test): 处理 CodeRabbit 复审建议
tesgth032 Feb 23, 2026
a98ec3a
fix(ui): 客户端限制输入补齐错误反馈
tesgth032 Feb 23, 2026
5a1290d
fix(ui): 改善服务商表单的客户端限制与模型选择体验
tesgth032 Feb 23, 2026
29fe9e1
chore: 同步 dev
tesgth032 Feb 23, 2026
38fb971
perf(ui): Provider 表单减少无效重算
tesgth032 Feb 23, 2026
059ecd7
chore: format code (fix-issue-799-mobile-ui-38fb971)
github-actions[bot] Feb 23, 2026
bc9cdf5
fix(build): standalone 本地运行补齐静态资源
tesgth032 Feb 23, 2026
c147c91
fix(ui): 调整思考预算/自适应思考提示触发与定位
tesgth032 Feb 24, 2026
eef2765
修复 Provider 覆盖项下拉宽度与提示交互
tesgth032 Feb 24, 2026
a7573cb
修复 TagInput 选择建议后下拉关闭
tesgth032 Feb 24, 2026
348c5f7
修复下拉信息图标阻挡点击
tesgth032 Feb 24, 2026
72fb6ba
修复表单步骤进度条动画
tesgth032 Feb 24, 2026
1e194ee
test(e2e): 修复登录 Cookie 解析与重试策略
tesgth032 Feb 24, 2026
8ad5970
fix: 优化客户端限制开关与 E2E 重试判定
tesgth032 Feb 24, 2026
e05288b
test(e2e): 收敛 fetch retry 的错误类型
tesgth032 Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions messages/en/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,12 @@
},
"keyListHeader": {
"todayUsage": "Today's Usage",
"userStatus": {
"disabled": "Disabled",
"expired": "Expired",
"expiringSoon": "Expiring soon",
"active": "Enabled"
},
"allowedModels": {
"label": "Allowed Models",
"noRestrictions": "Allowed Models: No restrictions"
Expand Down
1 change: 1 addition & 0 deletions messages/en/settings/providers/batchEdit.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"description": "Review changes before applying to {count} providers",
"providerHeader": "{name}",
"fieldChanged": "{field}: {before} -> {after}",
"nullValue": "null",
"fieldSkipped": "{field}: Skipped ({reason})",
"excludeProvider": "Exclude",
"summary": "{providerCount} providers, {fieldCount} changes, {skipCount} skipped",
Expand Down
3 changes: 2 additions & 1 deletion messages/en/settings/providers/form/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"routing": "Routing",
"limits": "Limits",
"network": "Network",
"testing": "Testing"
"testing": "Testing",
"stepProgress": "Step progress"
}
}
3 changes: 3 additions & 0 deletions messages/en/settings/providers/form/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@
"title": "Model Allowlist"
},
"clientRestrictions": {
"toggleLabel": "Enable Client Restrictions",
"toggleDesc": "Clients are not restricted by default. Enable to configure allowlist/blocklist rules.",
"priorityNote": "Blocklist takes precedence over allowlist.",
"allowedLabel": "Allowed Clients",
"allowedPlaceholder": "e.g. claude-code-cli",
"blockedLabel": "Blocked Clients",
Expand Down
6 changes: 6 additions & 0 deletions messages/ja/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,12 @@
},
"keyListHeader": {
"todayUsage": "本日の使用量",
"userStatus": {
"disabled": "無効",
"expired": "期限切れ",
"expiringSoon": "まもなく期限切れ",
"active": "有効"
},
"allowedModels": {
"label": "許可モデル",
"noRestrictions": "許可されたクライアント:制限なし"
Expand Down
1 change: 1 addition & 0 deletions messages/ja/settings/providers/batchEdit.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"description": "{count} 件のプロバイダーに適用する前に変更内容を確認してください",
"providerHeader": "{name}",
"fieldChanged": "{field}: {before} -> {after}",
"nullValue": "なし",
"fieldSkipped": "{field}: スキップ ({reason})",
"excludeProvider": "除外",
"summary": "{providerCount} 件のプロバイダー, {fieldCount} 件の変更, {skipCount} 件スキップ",
Expand Down
3 changes: 2 additions & 1 deletion messages/ja/settings/providers/form/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"routing": "ルーティング",
"limits": "制限",
"network": "ネットワーク",
"testing": "テスト"
"testing": "テスト",
"stepProgress": "ステップ進捗"
}
}
3 changes: 3 additions & 0 deletions messages/ja/settings/providers/form/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@
"title": "モデル許可リスト"
},
"clientRestrictions": {
"toggleLabel": "クライアント制限を有効化",
"toggleDesc": "既定ではクライアントを制限しません。有効化すると許可/拒否リストを設定できます。",
"priorityNote": "拒否リストは許可リストより優先されます。",
"allowedLabel": "許可クライアント",
"allowedPlaceholder": "例: claude-code-cli",
"blockedLabel": "ブロッククライアント",
Expand Down
6 changes: 6 additions & 0 deletions messages/ru/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,12 @@
},
"keyListHeader": {
"todayUsage": "Использование сегодня",
"userStatus": {
"disabled": "Отключен",
"expired": "Истек",
"expiringSoon": "Скоро истечет",
"active": "Активен"
},
"allowedModels": {
"label": "Разрешённые модели",
"noRestrictions": "Разрешённые модели: без ограничений"
Expand Down
1 change: 1 addition & 0 deletions messages/ru/settings/providers/batchEdit.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"description": "Проверьте изменения перед применением к {count} поставщикам",
"providerHeader": "{name}",
"fieldChanged": "{field}: {before} -> {after}",
"nullValue": "null",
"fieldSkipped": "{field}: Пропущено ({reason})",
"excludeProvider": "Исключить",
"summary": "{providerCount} поставщиков, {fieldCount} изменений, {skipCount} пропущено",
Expand Down
3 changes: 2 additions & 1 deletion messages/ru/settings/providers/form/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"routing": "Маршрутизация",
"limits": "Лимиты",
"network": "Сеть",
"testing": "Тестирование"
"testing": "Тестирование",
"stepProgress": "Прогресс шагов"
}
}
3 changes: 3 additions & 0 deletions messages/ru/settings/providers/form/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@
"title": "Список разрешённых моделей"
},
"clientRestrictions": {
"toggleLabel": "Включить ограничения клиентов",
"toggleDesc": "По умолчанию клиенты не ограничиваются. Включите, чтобы настроить правила белого/чёрного списка.",
"priorityNote": "Чёрный список имеет приоритет над белым списком.",
"allowedLabel": "Разрешённые клиенты",
"allowedPlaceholder": "напр. claude-code-cli",
"blockedLabel": "Заблокированные клиенты",
Expand Down
6 changes: 6 additions & 0 deletions messages/zh-CN/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,12 @@
},
"keyListHeader": {
"todayUsage": "今日用量",
"userStatus": {
"disabled": "已禁用",
"expired": "已过期",
"expiringSoon": "即将过期",
"active": "已启用"
},
"allowedModels": {
"label": "允许的模型",
"noRestrictions": "允许的模型:无限制"
Expand Down
1 change: 1 addition & 0 deletions messages/zh-CN/settings/providers/batchEdit.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"description": "将变更应用到 {count} 个供应商前请先确认",
"providerHeader": "{name}",
"fieldChanged": "{field}: {before} -> {after}",
"nullValue": "",
"fieldSkipped": "{field}: 已跳过 ({reason})",
"excludeProvider": "排除",
"summary": "{providerCount} 个供应商, {fieldCount} 项变更, {skipCount} 项跳过",
Expand Down
3 changes: 2 additions & 1 deletion messages/zh-CN/settings/providers/form/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"routing": "路由",
"limits": "限制",
"network": "网络",
"testing": "测试"
"testing": "测试",
"stepProgress": "步骤进度"
}
}
3 changes: 3 additions & 0 deletions messages/zh-CN/settings/providers/form/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"moreModels": "+{count} 更多"
},
"clientRestrictions": {
"toggleLabel": "启用客户端限制",
"toggleDesc": "默认不限制客户端。启用后可配置白名单/黑名单。",
"priorityNote": "黑名单优先级高于白名单。",
"allowedLabel": "白名单客户端",
"allowedPlaceholder": "例如 claude-code-cli",
"blockedLabel": "黑名单客户端",
Expand Down
6 changes: 6 additions & 0 deletions messages/zh-TW/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,12 @@
},
"keyListHeader": {
"todayUsage": "今日使用量",
"userStatus": {
"disabled": "已禁用",
"expired": "已過期",
"expiringSoon": "即將過期",
"active": "已啟用"
},
"allowedModels": {
"label": "允許的模型",
"noRestrictions": "允許的模型:無限制"
Expand Down
1 change: 1 addition & 0 deletions messages/zh-TW/settings/providers/batchEdit.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"description": "將變更應用到 {count} 個供應商前請先確認",
"providerHeader": "{name}",
"fieldChanged": "{field}: {before} -> {after}",
"nullValue": "",
"fieldSkipped": "{field}: 已跳過 ({reason})",
"excludeProvider": "排除",
"summary": "{providerCount} 個供應商, {fieldCount} 項變更, {skipCount} 項跳過",
Expand Down
3 changes: 2 additions & 1 deletion messages/zh-TW/settings/providers/form/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"routing": "路由",
"limits": "限制",
"network": "網路",
"testing": "測試"
"testing": "測試",
"stepProgress": "步驟進度"
}
}
3 changes: 3 additions & 0 deletions messages/zh-TW/settings/providers/form/sections.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@
"title": "模型允許清單"
},
"clientRestrictions": {
"toggleLabel": "啟用用戶端限制",
"toggleDesc": "預設不限制用戶端。啟用後可設定白名單/黑名單。",
"priorityNote": "黑名單優先於白名單。",
"allowedLabel": "白名單客戶端",
"allowedPlaceholder": "例如 claude-code-cli",
"blockedLabel": "黑名單客戶端",
Expand Down
19 changes: 19 additions & 0 deletions scripts/copy-version-to-standalone.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
const fs = require("node:fs");
const path = require("node:path");

function copyDirIfExists(srcDir, dstDir) {
if (!fs.existsSync(srcDir)) {
console.warn(`[copy-standalone] Skip missing dir: ${srcDir}`);
return;
}

fs.mkdirSync(path.dirname(dstDir), { recursive: true });
fs.cpSync(srcDir, dstDir, { recursive: true, force: true });
console.log(`[copy-standalone] Copied ${srcDir} -> ${dstDir}`);
}

const src = path.resolve(process.cwd(), "VERSION");
const dstDir = path.resolve(process.cwd(), ".next", "standalone");
const dst = path.join(dstDir, "VERSION");
Expand All @@ -13,3 +24,11 @@ if (!fs.existsSync(src)) {
fs.mkdirSync(dstDir, { recursive: true });
fs.copyFileSync(src, dst);
console.log(`[copy-version] Copied VERSION -> ${dst}`);

// Make standalone output self-contained for local `node .next/standalone/server.js` runs.
// Next.js standalone requires `.next/static` and `public` to exist next to `server.js`.
copyDirIfExists(
path.resolve(process.cwd(), ".next", "static"),
path.resolve(dstDir, ".next", "static")
);
copyDirIfExists(path.resolve(process.cwd(), "public"), path.resolve(dstDir, "public"));
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ export function StatisticsChartCard({
};

return (
<BentoCard className={cn("flex flex-col p-0 overflow-hidden max-h-[50vh]", className)}>
<BentoCard
className={cn(
"flex flex-col p-0 overflow-hidden max-h-[var(--cch-viewport-height-50)]",
className
)}
>
{/* Header */}
<div className="flex items-center justify-between border-b border-border/50 dark:border-white/[0.06]">
<div className="flex items-center gap-4 p-4">
Expand Down
6 changes: 5 additions & 1 deletion src/app/[locale]/dashboard/_components/dashboard-main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export function DashboardMain({ children }: DashboardMainProps) {
normalizedPathname.includes("/dashboard/sessions/") && normalizedPathname.endsWith("/messages");

if (isSessionMessagesPage) {
return <main className="h-[calc(100vh-64px)] w-full overflow-hidden">{children}</main>;
return (
<main className="h-[calc(var(--cch-viewport-height,100vh)-64px)] w-full overflow-hidden">
{children}
</main>
);
}

return <main className="mx-auto w-full max-w-7xl px-6 py-8">{children}</main>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function AddKeyDialog({

return (
<Dialog open={open} onOpenChange={handleClose}>
<DialogContent className="max-w-2xl max-h-[90dvh] max-h-[90vh] p-0 flex flex-col overflow-hidden">
<DialogContent className="max-w-2xl max-h-[var(--cch-viewport-height-90)] p-0 flex flex-col overflow-hidden">
{generatedKey ? (
<>
<DialogHeader className="px-6 pt-6 pb-4 border-b">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function AddUserDialog({
<ListPlus className="h-4 w-4" /> {t("addUser")}
</Button>
</DialogTrigger>
<DialogContent className="max-h-[85vh] overflow-y-auto">
<DialogContent className="max-h-[var(--cch-viewport-height-85)] overflow-y-auto">
<FormErrorBoundary>
<UserForm onSuccess={() => setOpen(false)} currentUser={currentUser} />
</FormErrorBoundary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function BatchEditDialogInner({
</DialogDescription>
</DialogHeader>

<div className="max-h-[70vh] overflow-y-auto space-y-6 pr-1">
<div className="max-h-[var(--cch-viewport-height-70)] overflow-y-auto space-y-6 pr-1">
{selectedUsersCount > 0 ? (
<BatchUserSection
affectedUsersCount={selectedUsersCount}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function CreateUserDialogInner({ onOpenChange, onSuccess }: CreateUserDialogProp
}

return (
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[90vh] max-h-[90dvh] p-0 flex flex-col overflow-hidden">
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[var(--cch-viewport-height-90)] p-0 flex flex-col overflow-hidden">
<form onSubmit={form.handleSubmit} className="flex flex-1 min-h-0 flex-col">
<DialogHeader className="px-6 pt-6 pb-4 border-b flex-shrink-0">
<div className="flex items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function EditKeyDialog({

return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-2xl max-h-[90dvh] p-0 flex flex-col overflow-hidden">
<DialogContent className="max-w-2xl max-h-[var(--cch-viewport-height-90)] p-0 flex flex-col overflow-hidden">
<DialogHeader className="sr-only">
<DialogTitle>{t("title")}</DialogTitle>
<DialogDescription>{t("description")}</DialogDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function EditUserDialogInner({ onOpenChange, user, onSuccess }: EditUserDialogPr
};

return (
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[90vh] max-h-[90dvh] p-0 flex flex-col overflow-hidden">
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[var(--cch-viewport-height-90,90vh)] p-0 flex flex-col overflow-hidden">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent CSS variable fallback usage

This file uses max-h-[var(--cch-viewport-height-90,90vh)] with an inline fallback, while the other ~30 files changed in this PR use the variable without a fallback (e.g., max-h-[var(--cch-viewport-height-90)]). The same inconsistency exists in user-actions.tsx:43 with --cch-viewport-height-85,85vh.

Since globals.css already defines --cch-viewport-height-90: 90vh as the default, the inline fallback is redundant. For consistency, either add the fallback everywhere or remove it here.

Suggested change
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[var(--cch-viewport-height-90,90vh)] p-0 flex flex-col overflow-hidden">
<DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[var(--cch-viewport-height-90)] p-0 flex flex-col overflow-hidden">
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/[locale]/dashboard/_components/user/edit-user-dialog.tsx
Line: 247

Comment:
**Inconsistent CSS variable fallback usage**

This file uses `max-h-[var(--cch-viewport-height-90,90vh)]` with an inline fallback, while the other ~30 files changed in this PR use the variable without a fallback (e.g., `max-h-[var(--cch-viewport-height-90)]`). The same inconsistency exists in `user-actions.tsx:43` with `--cch-viewport-height-85,85vh`.

Since `globals.css` already defines `--cch-viewport-height-90: 90vh` as the default, the inline fallback is redundant. For consistency, either add the fallback everywhere or remove it here.

```suggestion
    <DialogContent className="w-full max-w-[95vw] sm:max-w-[85vw] md:max-w-[70vw] lg:max-w-3xl max-h-[var(--cch-viewport-height-90)] p-0 flex flex-col overflow-hidden">
```

How can I resolve this? If you propose a fix, please make it concise.

<form onSubmit={form.handleSubmit} className="flex flex-1 min-h-0 flex-col">
<DialogHeader className="px-6 pt-6 pb-4 border-b flex-shrink-0">
<div className="flex items-center gap-2">
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/dashboard/_components/user/key-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function KeyActions({
<SquarePen className="h-4 w-4" />
</button>
</DialogTrigger>
<DialogContent className="max-h-[80vh] flex flex-col overflow-hidden">
<DialogContent className="max-h-[var(--cch-viewport-height-80)] flex flex-col overflow-hidden">
<FormErrorBoundary>
<EditKeyForm
keyData={keyData}
Expand All @@ -75,7 +75,7 @@ export function KeyActions({
<Trash2 className="h-4 w-4" />
</button>
</DialogTrigger>
<DialogContent className="max-h-[80vh] flex flex-col overflow-hidden">
<DialogContent className="max-h-[var(--cch-viewport-height-80)] flex flex-col overflow-hidden">
<FormErrorBoundary>
<DeleteKeyConfirm keyData={keyData} onSuccess={() => setOpenDelete(false)} />
</FormErrorBoundary>
Expand Down
24 changes: 16 additions & 8 deletions src/app/[locale]/dashboard/_components/user/key-list-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ import { UserActions } from "./user-actions";

const PROXY_STATUS_REFRESH_INTERVAL = 2000;

type UserStatusCode = "disabled" | "expired" | "expiringSoon" | "active";

const USER_STATUS_LABEL_KEYS: Record<UserStatusCode, string> = {
disabled: "userStatus.disabled",
expired: "userStatus.expired",
expiringSoon: "userStatus.expiringSoon",
active: "userStatus.active",
};

async function fetchProxyStatus(): Promise<ProxyStatusResponse> {
const result = await getProxyStatus();
if (result.ok) {
Expand Down Expand Up @@ -123,19 +132,18 @@ export function KeyListHeader({
const exp = activeUser.expiresAt ? new Date(activeUser.expiresAt).getTime() : null;

let status: {
code: string;
badge: string;
code: UserStatusCode;
variant: "default" | "secondary" | "destructive" | "outline";
};

if (!activeUser.isEnabled) {
status = { code: "disabled", badge: "已禁用", variant: "secondary" };
status = { code: "disabled", variant: "secondary" };
} else if (exp && exp <= now) {
status = { code: "expired", badge: "已过期", variant: "destructive" };
status = { code: "expired", variant: "destructive" };
} else if (exp && exp - now <= 72 * 60 * 60 * 1000) {
status = { code: "expiringSoon", badge: "即将过期", variant: "outline" };
status = { code: "expiringSoon", variant: "outline" };
} else {
status = { code: "active", badge: "已启用", variant: "default" };
status = { code: "active", variant: "default" };
}

const expiryText = activeUser.expiresAt
Expand Down Expand Up @@ -255,7 +263,7 @@ export function KeyListHeader({
<span>{activeUser ? activeUser.name : "-"}</span>
{activeUser && userStatusInfo && (
<Badge variant={userStatusInfo.status.variant} className="text-xs">
{userStatusInfo.status.badge}
{t(USER_STATUS_LABEL_KEYS[userStatusInfo.status.code])}
</Badge>
)}
{activeUser && <UserActions user={activeUser} currentUser={currentUser} />}
Expand Down Expand Up @@ -318,7 +326,7 @@ export function KeyListHeader({
<ListPlus className="h-3.5 w-3.5" /> {t("addKey")}
</Button>
</DialogTrigger>
<DialogContent className="max-h-[80vh] flex flex-col overflow-y-auto">
<DialogContent className="max-h-[var(--cch-viewport-height-80)] flex flex-col overflow-y-auto">
<FormErrorBoundary>
<AddKeyForm
userId={activeUser?.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function UserActions({ user, currentUser }: UserActionsProps) {
<SquarePen className="h-3.5 w-3.5" />
</button>
</DialogTrigger>
<DialogContent className="max-h-[85vh] overflow-y-auto">
<DialogContent className="max-h-[var(--cch-viewport-height-85,85vh)] overflow-y-auto">
<FormErrorBoundary>
<UserForm user={user} onSuccess={() => setOpenEdit(false)} currentUser={currentUser} />
</FormErrorBoundary>
Expand Down
Loading
Loading