Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
4a0008df
"vscode:/vscode.git/clone" did not exist on "00aaf0f796db8a4c3b47253df1030a6331a27830"
Commit
4a0008df
authored
Dec 31, 2025
by
song
Browse files
feat(Antigravity): 为不合格账户显示警告图标
parent
f284ea72
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/account/AccountUsageCell.vue
View file @
4a0008df
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
<!-- Antigravity OAuth accounts: show quota from extra field -->
<!-- Antigravity OAuth accounts: show quota from extra field -->
<
template
v-else-if=
"account.platform === 'antigravity' && account.type === 'oauth'"
>
<
template
v-else-if=
"account.platform === 'antigravity' && account.type === 'oauth'"
>
<!-- 账户类型徽章 -->
<!-- 账户类型徽章 -->
<div
v-if=
"antigravityTierLabel"
class=
"mb-1"
>
<div
v-if=
"antigravityTierLabel"
class=
"mb-1
flex items-center gap-1
"
>
<span
<span
:class=
"[
:class=
"[
'inline-block rounded px-1.5 py-0.5 text-[10px] font-medium',
'inline-block rounded px-1.5 py-0.5 text-[10px] font-medium',
...
@@ -105,6 +105,28 @@
...
@@ -105,6 +105,28 @@
>
>
{{
antigravityTierLabel
}}
{{
antigravityTierLabel
}}
</span>
</span>
<!-- 不合格账户警告图标 -->
<span
v-if=
"hasIneligibleTiers"
class=
"group relative cursor-help"
>
<svg
class=
"h-3.5 w-3.5 text-red-500"
fill=
"currentColor"
viewBox=
"0 0 20 20"
>
<path
fill-rule=
"evenodd"
d=
"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z"
clip-rule=
"evenodd"
/>
</svg>
<span
class=
"pointer-events-none absolute left-0 top-full z-50 mt-1 w-80 whitespace-normal break-words rounded bg-gray-900 px-3 py-2 text-xs leading-relaxed text-white opacity-0 shadow-lg transition-opacity group-hover:opacity-100 dark:bg-gray-700"
>
{{
t
(
'
admin.accounts.ineligibleWarning
'
)
}}
</span>
</span>
</div>
</div>
<div
v-if=
"hasAntigravityQuota"
class=
"space-y-1"
>
<div
v-if=
"hasAntigravityQuota"
class=
"space-y-1"
>
...
@@ -453,6 +475,18 @@ const antigravityTierClass = computed(() => {
...
@@ -453,6 +475,18 @@ const antigravityTierClass = computed(() => {
}
}
})
})
// 检测账户是否有不合格状态(ineligibleTiers)
const
hasIneligibleTiers
=
computed
(()
=>
{
const
extra
=
props
.
account
.
extra
as
Record
<
string
,
unknown
>
|
undefined
if
(
!
extra
)
return
false
const
loadCodeAssist
=
extra
.
load_code_assist
as
Record
<
string
,
unknown
>
|
undefined
if
(
!
loadCodeAssist
)
return
false
const
ineligibleTiers
=
loadCodeAssist
.
ineligibleTiers
as
unknown
[]
|
undefined
return
Array
.
isArray
(
ineligibleTiers
)
&&
ineligibleTiers
.
length
>
0
})
const
loadUsage
=
async
()
=>
{
const
loadUsage
=
async
()
=>
{
// Fetch usage for Anthropic OAuth and Setup Token accounts
// Fetch usage for Anthropic OAuth and Setup Token accounts
// OpenAI usage comes from account.extra field (updated during forwarding)
// OpenAI usage comes from account.extra field (updated during forwarding)
...
...
frontend/src/i18n/locales/en.ts
View file @
4a0008df
...
@@ -1194,7 +1194,9 @@ export default {
...
@@ -1194,7 +1194,9 @@ export default {
free
:
'
Free
'
,
free
:
'
Free
'
,
pro
:
'
Pro
'
,
pro
:
'
Pro
'
,
ultra
:
'
Ultra
'
ultra
:
'
Ultra
'
}
},
ineligibleWarning
:
'
This account is not eligible for Antigravity, but API forwarding still works. Use at your own risk.
'
},
},
// Proxies
// Proxies
...
...
frontend/src/i18n/locales/zh.ts
View file @
4a0008df
...
@@ -994,6 +994,8 @@ export default {
...
@@ -994,6 +994,8 @@ export default {
pro
:
'
Pro
'
,
pro
:
'
Pro
'
,
ultra
:
'
Ultra
'
ultra
:
'
Ultra
'
},
},
ineligibleWarning
:
'
该账号无 Antigravity 使用权限,但仍能进行 API 转发。继续使用请自行承担风险。
'
,
form
:
{
form
:
{
nameLabel
:
'
账号名称
'
,
nameLabel
:
'
账号名称
'
,
namePlaceholder
:
'
请输入账号名称
'
,
namePlaceholder
:
'
请输入账号名称
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment