mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
fix: 解决Git合并冲突
- 解决ApiKeysView.vue中的合并冲突 - 解决CreateApiKeyModal.vue中的合并冲突 - 解决EditApiKeyModal.vue中的合并冲突 - 保留本地修改版本,包含更完善的功能: - Claude OAuth和Console账户分组显示 - 移动端响应式优化 - 批量创建API Key功能 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -433,15 +433,6 @@
|
||||
<option value="">
|
||||
使用共享账号池
|
||||
</option>
|
||||
<<<<<<< Updated upstream
|
||||
<option
|
||||
v-for="account in accounts.claude.filter(a => a.isDedicated)"
|
||||
:key="account.id"
|
||||
:value="account.id"
|
||||
>
|
||||
{{ account.name }} ({{ account.status === 'active' ? '正常' : '异常' }})
|
||||
</option>
|
||||
=======
|
||||
<optgroup
|
||||
v-if="localAccounts.claude.filter(a => a.isDedicated && a.platform === 'claude-oauth').length > 0"
|
||||
label="Claude OAuth 账号"
|
||||
@@ -466,7 +457,6 @@
|
||||
{{ account.name }} ({{ account.status === 'active' ? '正常' : '异常' }})
|
||||
</option>
|
||||
</optgroup>
|
||||
>>>>>>> Stashed changes
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
@@ -891,43 +881,6 @@ const createApiKey = async () => {
|
||||
dailyCostLimit: form.dailyCostLimit !== '' && form.dailyCostLimit !== null ? parseFloat(form.dailyCostLimit) : 0,
|
||||
expiresAt: form.expiresAt || undefined,
|
||||
permissions: form.permissions,
|
||||
<<<<<<< Updated upstream
|
||||
claudeAccountId: form.claudeAccountId || undefined,
|
||||
geminiAccountId: form.geminiAccountId || undefined,
|
||||
tags: form.tags.length > 0 ? form.tags : undefined
|
||||
}
|
||||
|
||||
// 处理Claude账户绑定(区分OAuth和Console)
|
||||
if (form.claudeAccountId) {
|
||||
if (form.claudeAccountId.startsWith('console:')) {
|
||||
// Claude Console账户
|
||||
data.claudeConsoleAccountId = form.claudeAccountId.substring(8);
|
||||
} else {
|
||||
// Claude OAuth账户
|
||||
data.claudeAccountId = form.claudeAccountId;
|
||||
}
|
||||
}
|
||||
|
||||
// Gemini账户绑定
|
||||
if (form.geminiAccountId) {
|
||||
data.geminiAccountId = form.geminiAccountId;
|
||||
}
|
||||
|
||||
// 模型限制 - 始终提交这些字段
|
||||
data.enableModelRestriction = form.enableModelRestriction
|
||||
data.restrictedModels = form.restrictedModels
|
||||
|
||||
// 客户端限制 - 始终提交这些字段
|
||||
data.enableClientRestriction = form.enableClientRestriction
|
||||
data.allowedClients = form.allowedClients
|
||||
|
||||
const result = await apiClient.post('/admin/api-keys', data)
|
||||
|
||||
if (result.success) {
|
||||
showToast('API Key 创建成功', 'success')
|
||||
emit('success', result.data)
|
||||
emit('close')
|
||||
=======
|
||||
tags: form.tags.length > 0 ? form.tags : undefined,
|
||||
enableModelRestriction: form.enableModelRestriction,
|
||||
restrictedModels: form.restrictedModels,
|
||||
@@ -967,7 +920,6 @@ const createApiKey = async () => {
|
||||
} else {
|
||||
showToast(result.message || '创建失败', 'error')
|
||||
}
|
||||
>>>>>>> Stashed changes
|
||||
} else {
|
||||
// 批量创建
|
||||
const data = {
|
||||
|
||||
@@ -302,15 +302,6 @@
|
||||
<option value="">
|
||||
使用共享账号池
|
||||
</option>
|
||||
<<<<<<< Updated upstream
|
||||
<option
|
||||
v-for="account in accounts.claude"
|
||||
:key="account.id"
|
||||
:value="account.id"
|
||||
>
|
||||
{{ account.name }} ({{ account.status === 'active' ? '正常' : '异常' }})
|
||||
</option>
|
||||
=======
|
||||
<optgroup
|
||||
v-if="localAccounts.claude.filter(a => a.isDedicated && a.platform === 'claude-oauth').length > 0"
|
||||
label="Claude OAuth 账号"
|
||||
@@ -335,7 +326,6 @@
|
||||
{{ account.name }} ({{ account.status === 'active' ? '正常' : '异常' }})
|
||||
</option>
|
||||
</optgroup>
|
||||
>>>>>>> Stashed changes
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user