feat: add takeover config UI to authorization management page

- Added updateTakeoverConfig API function (PUT /api/avatar/{id}/authorizations/takeover)
- Added expandable takeover config section per auth card with toggle switch, mode selector (immediate/delayed), and delay seconds input
- Added takeover summary badge showing current config when not editing
- Styles follow existing light theme with indigo (#6366F1) accent
This commit is contained in:
stefanfeng
2026-08-07 17:07:21 +08:00
parent 8e365e63e1
commit 43f2ad9edb
2 changed files with 256 additions and 1 deletions
+9
View File
@@ -299,4 +299,13 @@ export const getCurrentUser = () =>
export const logoutUser = () =>
request.post('/huihui/logout')
// 更新接管配置
export const updateTakeoverConfig = (avatarId: string, data: {
authorizationId: string
takeoverEnabled: boolean
takeoverMode?: 'immediate' | 'delayed'
takeoverDelaySeconds?: number
}) =>
request.put(`/avatar/${avatarId}/authorizations/takeover`, data)
export default request