diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx
index a2264dc..eca1ad9 100644
--- a/src/app/admin/page.tsx
+++ b/src/app/admin/page.tsx
@@ -1044,8 +1044,12 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 配置用户采集源权限弹窗 */}
{showConfigureApisModal && selectedUser && createPortal(
-
-
+
{
+ setShowConfigureApisModal(false);
+ setSelectedUser(null);
+ setSelectedApis([]);
+ }}>
+
e.stopPropagation()}>
@@ -1169,8 +1173,11 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 添加用户组弹窗 */}
{showAddUserGroupForm && createPortal(
-
-
+
{
+ setShowAddUserGroupForm(false);
+ setNewUserGroup({ name: '', enabledApis: [] });
+ }}>
+
e.stopPropagation()}>
@@ -1294,8 +1301,11 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 编辑用户组弹窗 */}
{showEditUserGroupForm && editingUserGroup && createPortal(
-
-
+
{
+ setShowEditUserGroupForm(false);
+ setEditingUserGroup(null);
+ }}>
+
e.stopPropagation()}>
@@ -1402,8 +1412,12 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 配置用户组弹窗 */}
{showConfigureUserGroupModal && selectedUserForGroup && createPortal(
-
-
+
{
+ setShowConfigureUserGroupModal(false);
+ setSelectedUserForGroup(null);
+ setSelectedUserGroups([]);
+ }}>
+
e.stopPropagation()}>
@@ -1493,8 +1507,11 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 删除用户组确认弹窗 */}
{showDeleteUserGroupModal && deletingUserGroup && createPortal(
-
-
+
{
+ setShowDeleteUserGroupModal(false);
+ setDeletingUserGroup(null);
+ }}>
+
e.stopPropagation()}>
@@ -1589,8 +1606,11 @@ const UserConfig = ({ config, role, refreshConfig }: UserConfigProps) => {
{/* 删除用户确认弹窗 */}
{showDeleteUserModal && deletingUser && createPortal(
-
-
+
{
+ setShowDeleteUserModal(false);
+ setDeletingUser(null);
+ }}>
+
e.stopPropagation()}>
@@ -2187,8 +2207,8 @@ const VideoSourceConfig = ({
{/* 有效性检测弹窗 */}
{showValidationModal && createPortal(
-
-
+
setShowValidationModal(false)}>
+
e.stopPropagation()}>
视频源有效性检测
@@ -3618,8 +3638,8 @@ function AdminPageClient() {
{/* 重置配置确认弹窗 */}
{showResetConfigModal && createPortal(
-
-
+
setShowResetConfigModal(false)}>
+
e.stopPropagation()}>
diff --git a/src/components/DataMigration.tsx b/src/components/DataMigration.tsx
index 99e9b4f..01fa2fd 100644
--- a/src/components/DataMigration.tsx
+++ b/src/components/DataMigration.tsx
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
'use client';
-import { AlertCircle,AlertTriangle, CheckCircle, Download, FileCheck, Lock, Upload } from 'lucide-react';
-import { useEffect,useRef, useState } from 'react';
+import { AlertCircle, AlertTriangle, CheckCircle, Download, FileCheck, Lock, Upload } from 'lucide-react';
+import { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
interface DataMigrationProps {
@@ -79,8 +79,8 @@ const AlertModal = ({
};
return createPortal(
-