mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 18:37:46 +08:00
fix(provider): move key model auto-match into dialog
This commit is contained in:
@@ -467,15 +467,6 @@
|
||||
>
|
||||
<Shield class="w-3.5 h-3.5" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7"
|
||||
title="按此 Key 自动勾选同名模型"
|
||||
@click="handleAutoMatchKeyModels(key)"
|
||||
>
|
||||
<ListChecks class="w-3.5 h-3.5" />
|
||||
</Button>
|
||||
<!-- 代理节点配置 -->
|
||||
<Popover
|
||||
:open="proxyPopoverOpenKeyId === key.id"
|
||||
@@ -1332,7 +1323,6 @@
|
||||
:open="batchAssignDialogOpen"
|
||||
:provider-id="provider.id"
|
||||
:provider-name="provider.name"
|
||||
:auto-match-key="batchAssignAutoMatchKey"
|
||||
@update:open="handleBatchAssignDialogOpenUpdate"
|
||||
@changed="handleBatchAssignChanged"
|
||||
/>
|
||||
@@ -1378,7 +1368,6 @@ import {
|
||||
ShieldX,
|
||||
Globe,
|
||||
GitBranch,
|
||||
ListChecks,
|
||||
} from 'lucide-vue-next'
|
||||
import { parseApiError } from '@/utils/errorParser'
|
||||
import { useEscapeKey } from '@/composables/useEscapeKey'
|
||||
@@ -1475,12 +1464,6 @@ interface ProviderEndpointWithKeys extends ProviderEndpoint {
|
||||
rpm_limit?: number
|
||||
}
|
||||
|
||||
interface BatchAssignAutoMatchKey {
|
||||
id: string
|
||||
name?: string | null
|
||||
api_key_masked?: string | null
|
||||
}
|
||||
|
||||
interface Props {
|
||||
providerId: string | null
|
||||
open: boolean
|
||||
@@ -1547,7 +1530,6 @@ const revealedKeys = ref<Map<string, string>>(new Map())
|
||||
const modelFormDialogOpen = ref(false)
|
||||
const editingModel = ref<Model | null>(null)
|
||||
const batchAssignDialogOpen = ref(false)
|
||||
const batchAssignAutoMatchKey = ref<BatchAssignAutoMatchKey | null>(null)
|
||||
const modelMappingTabRef = ref<InstanceType<typeof ModelMappingTab> | null>(null)
|
||||
|
||||
// 密钥列表拖拽排序状态
|
||||
@@ -1756,7 +1738,6 @@ watch(
|
||||
oauthKeyEditDialogOpen.value = false
|
||||
deleteKeyConfirmOpen.value = false
|
||||
batchAssignDialogOpen.value = false
|
||||
batchAssignAutoMatchKey.value = null
|
||||
antigravityQuotaDialogOpen.value = false
|
||||
antigravityQuotaDialogKey.value = null
|
||||
|
||||
@@ -3107,24 +3088,11 @@ function handleEditModel(model: Model) {
|
||||
|
||||
// 处理打开批量关联对话框
|
||||
function handleBatchAssign() {
|
||||
batchAssignAutoMatchKey.value = null
|
||||
batchAssignDialogOpen.value = true
|
||||
}
|
||||
|
||||
function handleAutoMatchKeyModels(key: EndpointAPIKey) {
|
||||
batchAssignAutoMatchKey.value = {
|
||||
id: key.id,
|
||||
name: key.name,
|
||||
api_key_masked: key.api_key_masked,
|
||||
}
|
||||
batchAssignDialogOpen.value = true
|
||||
}
|
||||
|
||||
function handleBatchAssignDialogOpenUpdate(value: boolean) {
|
||||
batchAssignDialogOpen.value = value
|
||||
if (!value) {
|
||||
batchAssignAutoMatchKey.value = null
|
||||
}
|
||||
}
|
||||
|
||||
// 处理批量关联完成
|
||||
|
||||
Reference in New Issue
Block a user