Merge branch 'fix/account-filters-menu-missing-features'
## Summary - 修复账号管理页面组件拆分时遗漏的功能 - 统一所有内联 SVG 为 Icon 组件 - 修复 ProxySelector 选择"无代理"时发送错误值的问题 ## Changes - AccountTableFilters: 添加 Antigravity 平台选项、类型筛选器、inactive 状态 - AccountActionMenu: 恢复重置状态和清除限速按钮 - AccountsView: 修正 handleClearRateLimit 调用正确的 API - ProxySelector: 修复选择"无代理"时发送 null 而不是 0 ## Conflict Resolution - ProxySelector.vue: 采用 PR 分支的正确逻辑(发送 null 而不是 0) 这是正确的修复,因为后端使用 *int64 类型,nil 会触发 ClearProxyID()
This commit is contained in:
@@ -3,22 +3,18 @@
|
||||
<TablePageLayout>
|
||||
<template #filters>
|
||||
<div class="flex flex-wrap-reverse items-start justify-between gap-3">
|
||||
<div class="min-w-0 flex-1">
|
||||
<AccountTableFilters
|
||||
v-model:searchQuery="params.search"
|
||||
:filters="params"
|
||||
@change="reload"
|
||||
@update:searchQuery="debouncedReload"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex-shrink-0">
|
||||
<AccountTableActions
|
||||
:loading="loading"
|
||||
@refresh="load"
|
||||
@sync="showSync = true"
|
||||
@create="showCreate = true"
|
||||
/>
|
||||
</div>
|
||||
<AccountTableFilters
|
||||
v-model:searchQuery="params.search"
|
||||
:filters="params"
|
||||
@change="reload"
|
||||
@update:searchQuery="debouncedReload"
|
||||
/>
|
||||
<AccountTableActions
|
||||
:loading="loading"
|
||||
@refresh="load"
|
||||
@sync="showSync = true"
|
||||
@create="showCreate = true"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #table>
|
||||
@@ -201,10 +197,10 @@ const handleViewStats = (a: Account) => { statsAcc.value = a; showStats.value =
|
||||
const handleReAuth = (a: Account) => { reAuthAcc.value = a; showReAuth.value = true }
|
||||
const handleRefresh = async (a: Account) => { try { await adminAPI.accounts.refreshCredentials(a.id); load() } catch {} }
|
||||
const handleResetStatus = async (a: Account) => { try { await adminAPI.accounts.clearError(a.id); appStore.showSuccess(t('common.success')); load() } catch {} }
|
||||
const handleClearRateLimit = async (a: Account) => { try { await adminAPI.accounts.clearError(a.id); appStore.showSuccess(t('common.success')); load() } catch {} }
|
||||
const handleClearRateLimit = async (a: Account) => { try { await adminAPI.accounts.clearRateLimit(a.id); appStore.showSuccess(t('common.success')); load() } catch {} }
|
||||
const handleDelete = (a: Account) => { deletingAcc.value = a; showDeleteDialog.value = true }
|
||||
const confirmDelete = async () => { if(!deletingAcc.value) return; try { await adminAPI.accounts.delete(deletingAcc.value.id); showDeleteDialog.value = false; deletingAcc.value = null; reload() } catch {} }
|
||||
const handleToggleSchedulable = async (a: Account) => { togglingSchedulable.value = a.id; try { await adminAPI.accounts.update(a.id, { schedulable: !a.schedulable }); load() } finally { togglingSchedulable.value = null } }
|
||||
const handleToggleSchedulable = async (a: Account) => { togglingSchedulable.value = a.id; try { await adminAPI.accounts.setSchedulable(a.id, !a.schedulable); load() } finally { togglingSchedulable.value = null } }
|
||||
const handleShowTempUnsched = (a: Account) => { tempUnschedAcc.value = a; showTempUnsched.value = true }
|
||||
const handleTempUnschedReset = async () => { if(!tempUnschedAcc.value) return; try { await adminAPI.accounts.clearError(tempUnschedAcc.value.id); showTempUnsched.value = false; tempUnschedAcc.value = null; load() } catch {} }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user