fix: 移除所有弹框遮罩层点击关闭 — 防止输入时误触关闭
涉及文件 (12处): - InstancePage.tsx: 添加数据源弹框 - UsersPage.tsx: 新建/编辑/重置密码/详情弹框 (4处) - RolesPage.tsx: 克隆角色弹框 - InstanceGroupPage.tsx: 新建/编辑/关联实例/关联用户弹框 (4处) - SlowQueryPage.tsx: 查询对比弹框 - RedisDetailPage.tsx: 键详情/新增键弹框 (2处) 改动: 遮罩层div移除onClick,只能通过X按钮或取消按钮关闭
This commit is contained in:
1 parent
47f077c97f
commit
9f56e866f2
6 files changed
+13
-13
No files matched your search
@@ -590,7 +590,7 @@ function CreateUserModal({ onClose, onCreated, setToast }: { onClose: () => void
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50" onClick={onClose}>
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
|
||||
<div className="w-full max-w-md bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-xl p-6 shadow-xl" onClick={e => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between mb-5">
|
||||
<h2 className="text-lg font-semibold">新建用户</h2>
|
||||
@@ -677,7 +677,7 @@ function EditUserModal({ user, onClose, onUpdated, setToast }: { user: UserItem;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50" onClick={onClose}>
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
|
||||
<div className="w-full max-w-md bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-xl p-6 shadow-xl" onClick={e => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between mb-5">
|
||||
<h2 className="text-lg font-semibold">编辑用户</h2>
|
||||
@@ -758,7 +758,7 @@ function ResetPasswordModal({ user, onClose, setToast }: { user: UserItem; onClo
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50" onClick={onClose}>
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
|
||||
<div className="w-full max-w-sm bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-xl p-6 shadow-xl" onClick={e => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between mb-5">
|
||||
<h2 className="text-lg font-semibold flex items-center gap-2"><KeyRound className="w-5 h-5 text-yellow-400" /> 重置密码</h2>
|
||||
@@ -795,7 +795,7 @@ function UserDetailModal({ user, onClose }: { user: UserItem; onClose: () => voi
|
||||
const activities = useMemo(() => generateMockActivities(user.id), [user.id]);
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50" onClick={onClose}>
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
|
||||
<div className="w-full max-w-lg bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-xl p-6 shadow-xl max-h-[80vh] overflow-y-auto" onClick={e => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between mb-5">
|
||||
<h2 className="text-lg font-semibold">用户详情</h2>
|
||||
|
||||
Reference in new issue
Block a user