fix: 移除Antigravity的apikey账户额外的表单
This commit is contained in:
@@ -665,8 +665,8 @@
|
|||||||
<Icon name="cloud" size="sm" />
|
<Icon name="cloud" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="block text-sm font-medium text-gray-900 dark:text-white">{{ t('admin.accounts.types.upstream') }}</span>
|
<span class="block text-sm font-medium text-gray-900 dark:text-white">API Key</span>
|
||||||
<span class="text-xs text-gray-500 dark:text-gray-400">{{ t('admin.accounts.types.upstreamDesc') }}</span>
|
<span class="text-xs text-gray-500 dark:text-gray-400">{{ t('admin.accounts.types.antigravityApikey') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -681,7 +681,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
class="input"
|
class="input"
|
||||||
placeholder="https://s.konstants.xyz"
|
placeholder="https://cloudcode-pa.googleapis.com"
|
||||||
/>
|
/>
|
||||||
<p class="input-hint">{{ t('admin.accounts.upstream.baseUrlHint') }}</p>
|
<p class="input-hint">{{ t('admin.accounts.upstream.baseUrlHint') }}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -816,8 +816,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- API Key input (only for apikey type) -->
|
<!-- API Key input (only for apikey type, excluding Antigravity which has its own fields) -->
|
||||||
<div v-if="form.type === 'apikey'" class="space-y-4">
|
<div v-if="form.type === 'apikey' && form.platform !== 'antigravity'" class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="input-label">{{ t('admin.accounts.baseUrl') }}</label>
|
<label class="input-label">{{ t('admin.accounts.baseUrl') }}</label>
|
||||||
<input
|
<input
|
||||||
@@ -862,7 +862,7 @@
|
|||||||
<p class="input-hint">{{ t('admin.accounts.gemini.tier.aiStudioHint') }}</p>
|
<p class="input-hint">{{ t('admin.accounts.gemini.tier.aiStudioHint') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Model Restriction Section (不适用于 Gemini) -->
|
<!-- Model Restriction Section (不适用于 Gemini,Antigravity 已在上层条件排除) -->
|
||||||
<div v-if="form.platform !== 'gemini'" class="border-t border-gray-200 pt-4 dark:border-dark-600">
|
<div v-if="form.platform !== 'gemini'" class="border-t border-gray-200 pt-4 dark:border-dark-600">
|
||||||
<label class="input-label">{{ t('admin.accounts.modelRestriction') }}</label>
|
<label class="input-label">{{ t('admin.accounts.modelRestriction') }}</label>
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
? 'https://api.openai.com'
|
? 'https://api.openai.com'
|
||||||
: account.platform === 'gemini'
|
: account.platform === 'gemini'
|
||||||
? 'https://generativelanguage.googleapis.com'
|
? 'https://generativelanguage.googleapis.com'
|
||||||
: 'https://api.anthropic.com'
|
: account.platform === 'antigravity'
|
||||||
|
? 'https://cloudcode-pa.googleapis.com'
|
||||||
|
: 'https://api.anthropic.com'
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<p class="input-hint">{{ baseUrlHint }}</p>
|
<p class="input-hint">{{ baseUrlHint }}</p>
|
||||||
@@ -55,14 +57,16 @@
|
|||||||
? 'sk-proj-...'
|
? 'sk-proj-...'
|
||||||
: account.platform === 'gemini'
|
: account.platform === 'gemini'
|
||||||
? 'AIza...'
|
? 'AIza...'
|
||||||
: 'sk-ant-...'
|
: account.platform === 'antigravity'
|
||||||
|
? 'sk-...'
|
||||||
|
: 'sk-ant-...'
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<p class="input-hint">{{ t('admin.accounts.leaveEmptyToKeep') }}</p>
|
<p class="input-hint">{{ t('admin.accounts.leaveEmptyToKeep') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Model Restriction Section (不适用于 Gemini) -->
|
<!-- Model Restriction Section (不适用于 Gemini 和 Antigravity) -->
|
||||||
<div v-if="account.platform !== 'gemini'" class="border-t border-gray-200 pt-4 dark:border-dark-600">
|
<div v-if="account.platform !== 'gemini' && account.platform !== 'antigravity'" class="border-t border-gray-200 pt-4 dark:border-dark-600">
|
||||||
<label class="input-label">{{ t('admin.accounts.modelRestriction') }}</label>
|
<label class="input-label">{{ t('admin.accounts.modelRestriction') }}</label>
|
||||||
|
|
||||||
<!-- Mode Toggle -->
|
<!-- Mode Toggle -->
|
||||||
@@ -372,7 +376,7 @@
|
|||||||
v-model="editBaseUrl"
|
v-model="editBaseUrl"
|
||||||
type="text"
|
type="text"
|
||||||
class="input"
|
class="input"
|
||||||
placeholder="https://s.konstants.xyz"
|
placeholder="https://cloudcode-pa.googleapis.com"
|
||||||
/>
|
/>
|
||||||
<p class="input-hint">{{ t('admin.accounts.upstream.baseUrlHint') }}</p>
|
<p class="input-hint">{{ t('admin.accounts.upstream.baseUrlHint') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1359,6 +1359,7 @@ export default {
|
|||||||
googleOauth: 'Google OAuth',
|
googleOauth: 'Google OAuth',
|
||||||
codeAssist: 'Code Assist',
|
codeAssist: 'Code Assist',
|
||||||
antigravityOauth: 'Antigravity OAuth',
|
antigravityOauth: 'Antigravity OAuth',
|
||||||
|
antigravityApikey: 'Connect via Base URL + API Key',
|
||||||
upstream: 'Upstream',
|
upstream: 'Upstream',
|
||||||
upstreamDesc: 'Connect via Base URL + API Key'
|
upstreamDesc: 'Connect via Base URL + API Key'
|
||||||
},
|
},
|
||||||
@@ -1625,7 +1626,7 @@ export default {
|
|||||||
// Upstream type
|
// Upstream type
|
||||||
upstream: {
|
upstream: {
|
||||||
baseUrl: 'Upstream Base URL',
|
baseUrl: 'Upstream Base URL',
|
||||||
baseUrlHint: 'The address of the upstream Antigravity service, e.g., https://s.konstants.xyz',
|
baseUrlHint: 'The address of the upstream Antigravity service, e.g., https://cloudcode-pa.googleapis.com',
|
||||||
apiKey: 'Upstream API Key',
|
apiKey: 'Upstream API Key',
|
||||||
apiKeyHint: 'API Key for the upstream service',
|
apiKeyHint: 'API Key for the upstream service',
|
||||||
pleaseEnterBaseUrl: 'Please enter upstream Base URL',
|
pleaseEnterBaseUrl: 'Please enter upstream Base URL',
|
||||||
|
|||||||
@@ -1493,6 +1493,7 @@ export default {
|
|||||||
googleOauth: 'Google OAuth',
|
googleOauth: 'Google OAuth',
|
||||||
codeAssist: 'Code Assist',
|
codeAssist: 'Code Assist',
|
||||||
antigravityOauth: 'Antigravity OAuth',
|
antigravityOauth: 'Antigravity OAuth',
|
||||||
|
antigravityApikey: '通过 Base URL + API Key 连接',
|
||||||
upstream: '对接上游',
|
upstream: '对接上游',
|
||||||
upstreamDesc: '通过 Base URL + API Key 连接上游',
|
upstreamDesc: '通过 Base URL + API Key 连接上游',
|
||||||
api_key: 'API Key',
|
api_key: 'API Key',
|
||||||
@@ -1771,7 +1772,7 @@ export default {
|
|||||||
// Upstream type
|
// Upstream type
|
||||||
upstream: {
|
upstream: {
|
||||||
baseUrl: '上游 Base URL',
|
baseUrl: '上游 Base URL',
|
||||||
baseUrlHint: '上游 Antigravity 服务的地址,例如:https://s.konstants.xyz',
|
baseUrlHint: '上游 Antigravity 服务的地址,例如:https://cloudcode-pa.googleapis.com',
|
||||||
apiKey: '上游 API Key',
|
apiKey: '上游 API Key',
|
||||||
apiKeyHint: '上游服务的 API Key',
|
apiKeyHint: '上游服务的 API Key',
|
||||||
pleaseEnterBaseUrl: '请输入上游 Base URL',
|
pleaseEnterBaseUrl: '请输入上游 Base URL',
|
||||||
|
|||||||
Reference in New Issue
Block a user