refactor: 移除 KeyFormDialog 中的 OAuth 认证逻辑

OAuth 流程已由独立的 OAuthAccountDialog 处理,移除 KeyFormDialog 中冗余的
OAuth 表单、授权流程 UI 和状态管理代码。同时清理 provider_oauth.ts 中不再
使用的接口和函数,修复 ProviderOAuthCompleteRequest 重复声明问题。
This commit is contained in:
fawney19
2026-02-05 02:56:33 +08:00
parent d9d3a1afcf
commit 9c19a72d67
3 changed files with 22 additions and 460 deletions
@@ -507,10 +507,12 @@
>
<Key class="w-12 h-12 mx-auto mb-3 opacity-50" />
<p class="text-sm">
暂无密钥配置
{{ provider.provider_type === 'custom' ? '暂无密钥配置' : '暂无账号配置' }}
</p>
<p class="text-xs mt-1">
{{ endpoints.length > 0 ? '点击上方"添加密钥"按钮创建第一个密钥' : '请先添加端点,然后再添加密钥' }}
{{ endpoints.length > 0
? (provider.provider_type === 'custom' ? '点击上方"添加密钥"按钮创建第一个密钥' : '点击上方"添加账号"按钮添加第一个账号')
: '请先添加端点,然后再添加密钥' }}
</p>
</div>
</Card>
@@ -565,7 +567,6 @@
:available-api-formats="provider?.api_formats || []"
@close="keyFormDialogOpen = false"
@saved="handleKeyChanged"
@edit-created-key="handleEditCreatedKey"
/>
<!-- OAuth 账号对话框 -->
@@ -948,10 +949,6 @@ function handleEditKey(endpoint: ProviderEndpoint | undefined, key: EndpointAPIK
keyFormDialogOpen.value = true
}
function handleEditCreatedKey(key: EndpointAPIKey) {
editingKey.value = key
}
function handleKeyPermissions(key: EndpointAPIKey) {
editingKey.value = key
keyPermissionsDialogOpen.value = true