Compare commits

..

6 Commits

Author SHA1 Message Date
Supra4E8C
215ce61b48 fix: error display 2025-12-30 00:17:51 +08:00
Supra4E8C
a48e06a28c fix(auth-files): use account id for codex quota and show remaining 2025-12-29 23:13:55 +08:00
Supra4E8C
8a59ab73a1 chore(i18n): update antigravity refresh label 2025-12-29 12:33:04 +08:00
Supra4E8C
66d58288b4 fix(auth): update antigravity fetchAvailableModels endpoint 2025-12-29 12:09:37 +08:00
Supra4E8C
be3f58f0a8 fix(auth-files): cache Antigravity quota to avoid auto refresh on reopen 2025-12-29 01:18:18 +08:00
Supra4E8C
c299e403cc feat(auth-files): add Antigravity quota page size 2025-12-29 00:48:31 +08:00
4 changed files with 936 additions and 86 deletions

View File

@@ -34,6 +34,8 @@
"alias": "Alias", "alias": "Alias",
"failure": "Failure", "failure": "Failure",
"unknown_error": "Unknown error", "unknown_error": "Unknown error",
"quota_update_required": "Please update the CPA version or check for updates",
"quota_check_credential": "Please check the credential status",
"copy": "Copy", "copy": "Copy",
"custom_headers_label": "Custom Headers", "custom_headers_label": "Custom Headers",
"custom_headers_hint": "Optional HTTP headers to send with the request. Leave blank to remove.", "custom_headers_hint": "Optional HTTP headers to send with the request. Leave blank to remove.",
@@ -361,10 +363,34 @@
"title": "Antigravity Quota", "title": "Antigravity Quota",
"empty_title": "No Antigravity Auth Files", "empty_title": "No Antigravity Auth Files",
"empty_desc": "Upload an Antigravity credential to view remaining quota.", "empty_desc": "Upload an Antigravity credential to view remaining quota.",
"idle": "Not loaded. Click Refresh Button.",
"loading": "Loading quota...", "loading": "Loading quota...",
"load_failed": "Failed to load quota: {{message}}", "load_failed": "Failed to load quota: {{message}}",
"missing_auth_index": "Auth file missing auth_index", "missing_auth_index": "Auth file missing auth_index",
"empty_models": "No quota data available" "empty_models": "No quota data available",
"refresh_button": "Refresh Quota",
"fetch_all": "Fetch All"
},
"codex_quota": {
"title": "Codex Quota",
"empty_title": "No Codex Auth Files",
"empty_desc": "Upload a Codex credential to view quota.",
"idle": "Not loaded. Click Refresh Button.",
"loading": "Loading quota...",
"load_failed": "Failed to load quota: {{message}}",
"missing_auth_index": "Auth file missing auth_index",
"missing_account_id": "Codex credential missing ChatGPT account ID",
"empty_windows": "No quota data available",
"no_access": "This credential has no Codex access (plan: free).",
"refresh_button": "Refresh Quota",
"fetch_all": "Fetch All",
"primary_window": "5-hour limit",
"secondary_window": "Weekly limit",
"code_review_window": "Code review limit",
"plan_label": "Plan",
"plan_plus": "Plus",
"plan_team": "Team",
"plan_free": "Free"
}, },
"vertex_import": { "vertex_import": {
"title": "Vertex JSON Login", "title": "Vertex JSON Login",

View File

@@ -34,6 +34,8 @@
"alias": "别名", "alias": "别名",
"failure": "失败", "failure": "失败",
"unknown_error": "未知错误", "unknown_error": "未知错误",
"quota_update_required": "请更新 CPA 版本或检查更新",
"quota_check_credential": "请检查凭证状态",
"copy": "复制", "copy": "复制",
"custom_headers_label": "自定义请求头", "custom_headers_label": "自定义请求头",
"custom_headers_hint": "可选,设置需要附带到请求中的 HTTP 头,名称和值均不能为空。", "custom_headers_hint": "可选,设置需要附带到请求中的 HTTP 头,名称和值均不能为空。",
@@ -361,10 +363,34 @@
"title": "Antigravity 额度", "title": "Antigravity 额度",
"empty_title": "暂无 Antigravity 认证", "empty_title": "暂无 Antigravity 认证",
"empty_desc": "上传 Antigravity 认证文件后即可查看额度。", "empty_desc": "上传 Antigravity 认证文件后即可查看额度。",
"idle": "尚未加载额度,请点击刷新按钮。",
"loading": "正在加载额度...", "loading": "正在加载额度...",
"load_failed": "额度获取失败:{{message}}", "load_failed": "额度获取失败:{{message}}",
"missing_auth_index": "认证文件缺少 auth_index", "missing_auth_index": "认证文件缺少 auth_index",
"empty_models": "暂无额度数据" "empty_models": "暂无额度数据",
"refresh_button": "刷新额度",
"fetch_all": "获取全部"
},
"codex_quota": {
"title": "Codex 额度",
"empty_title": "暂无 Codex 认证",
"empty_desc": "上传 Codex 认证文件后即可查看额度。",
"idle": "尚未加载额度,请点击刷新按钮。",
"loading": "正在加载额度...",
"load_failed": "额度获取失败:{{message}}",
"missing_auth_index": "认证文件缺少 auth_index",
"missing_account_id": "Codex 凭证缺少 ChatGPT 账号 ID",
"empty_windows": "暂无额度数据",
"no_access": "该凭证已无 Codex 访问权限free。",
"refresh_button": "刷新额度",
"fetch_all": "获取全部",
"primary_window": "5 小时限额",
"secondary_window": "周限额",
"code_review_window": "代码审查限额",
"plan_label": "套餐",
"plan_plus": "Plus",
"plan_team": "Team",
"plan_free": "Free"
}, },
"vertex_import": { "vertex_import": {
"title": "Vertex JSON 登录", "title": "Vertex JSON 登录",

View File

@@ -176,6 +176,62 @@
} }
} }
.codexGrid {
display: grid;
gap: $spacing-md;
grid-template-columns: repeat(3, minmax(0, 1fr));
@include tablet {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@include mobile {
grid-template-columns: 1fr;
}
}
.antigravityControls {
display: flex;
gap: $spacing-md;
flex-wrap: wrap;
align-items: flex-end;
margin-bottom: $spacing-md;
}
.antigravityControl {
display: flex;
flex-direction: column;
gap: 4px;
label {
font-size: 12px;
color: var(--text-secondary);
font-weight: 500;
white-space: nowrap;
}
}
.codexControls {
display: flex;
gap: $spacing-md;
flex-wrap: wrap;
align-items: flex-end;
margin-bottom: $spacing-md;
}
.codexControl {
display: flex;
flex-direction: column;
gap: 4px;
label {
font-size: 12px;
color: var(--text-secondary);
font-weight: 500;
white-space: nowrap;
}
}
.antigravityCard { .antigravityCard {
background-image: linear-gradient( background-image: linear-gradient(
180deg, 180deg,
@@ -184,6 +240,14 @@
); );
} }
.codexCard {
background-image: linear-gradient(
180deg,
rgba(255, 243, 224, 0.18),
rgba(255, 243, 224, 0)
);
}
.quotaSection { .quotaSection {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -290,6 +354,33 @@
padding: $spacing-xs $spacing-sm; padding: $spacing-xs $spacing-sm;
} }
.quotaWarning {
font-size: 12px;
color: var(--warning-color, #f59e0b);
background-color: rgba(245, 158, 11, 0.12);
border: 1px solid var(--warning-color, #f59e0b);
border-radius: $radius-sm;
padding: $spacing-xs $spacing-sm;
}
.codexPlan {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--text-secondary);
}
.codexPlanLabel {
color: var(--text-tertiary);
}
.codexPlanValue {
font-weight: 600;
color: var(--text-primary);
text-transform: capitalize;
}
// 单个认证文件卡片 // 单个认证文件卡片
.fileCard { .fileCard {
background-color: var(--bg-primary); background-color: var(--bg-primary);

File diff suppressed because it is too large Load Diff