fix: 所有弹窗仅通过关闭按钮关闭,点击遮罩不再关闭

This commit is contained in:
jinghui committed 2026-11-19 09:10:51 +08:00
1 parent fa989d0220
commit 3c3d834806
7 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -214,7 +214,7 @@ export default function AIGenModal({ open, onClose, onSaved }) {
const noKey = providerInfo && !providerInfo.hasKey && !useCustom;
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4" onClick={onClose}>
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
<div
className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-[98vw] h-[98vh] max-w-none max-h-none overflow-hidden flex flex-col"
onClick={(e) => e.stopPropagation()}
@@ -510,7 +510,7 @@ export default function AIGenModal({ open, onClose, onSaved }) {
</button>
{showFolderPick && (
<>
<div className="fixed inset-0 z-10" onClick={() => setShowFolderPick(false)}></div>
<div className="fixed inset-0 z-10"></div>
<div className="absolute left-0 bottom-full mb-1 z-20 w-64 max-h-64 overflow-y-auto bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xl p-1">
{flattenFolders(folders).map((f) => (
<button
+1 -1
View File
@@ -116,7 +116,7 @@ function AIVideoModal({ libraryId, images, onClose, onDone }) {
const input = 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent';
return (
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4" onClick={(running || starting) ? undefined : onClose}>
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4">
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-lg max-h-[92vh] overflow-y-auto" onClick={(e) => e.stopPropagation()}>
<div className="flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700">
<div className="flex items-center gap-2">
@@ -177,7 +177,7 @@ export default function AIVideoStudioModal({ libraryId, onClose, onDone }) {
const input = 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent';
return (
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4" onClick={(running||starting)?undefined:onClose}>
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4">
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-[98vw] h-[98vh] max-w-none max-h-none overflow-y-auto" onClick={(e)=>e.stopPropagation()}>
<div className="flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700">
<div className="flex items-center gap-2">
+1 -1
View File
@@ -169,7 +169,7 @@ function BatchRenameModal({ isOpen, folder, libraryId, scope, keywords, onClose,
const modeInfo = MODES.find((m) => m.key === mode);
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4" onClick={handleClose}>
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
<div
className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-xl max-h-[90vh] overflow-hidden flex flex-col"
onClick={(e) => e.stopPropagation()}
@@ -203,7 +203,7 @@ function BatchWatermarkModal({ isOpen, mode, folder, libraryId, onClose, onFinis
: 0;
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4" onClick={handleClose}>
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
<div
className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[90vh] overflow-hidden flex flex-col"
onClick={(e) => e.stopPropagation()}
+1 -1
View File
@@ -181,7 +181,7 @@ export default function SettingsModal({ open, onClose, versionLabel, initialTab
];
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4" onClick={onClose}>
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4">
<div
className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-3xl max-h-[85vh] overflow-hidden flex"
onClick={(e) => e.stopPropagation()}
+1 -1
View File
@@ -138,7 +138,7 @@ function VideoEditModal({ file, libraryId, onClose, onDone }) {
const input = 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent';
return (
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4" onClick={busy ? undefined : onClose}>
<div className="fixed inset-0 z-50 bg-black bg-opacity-60 flex items-center justify-center p-4">
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-full max-w-3xl max-h-[92vh] overflow-y-auto" onClick={(e) => e.stopPropagation()}>
{/* 头部 */}
<div className="flex items-center justify-between px-5 py-4 border-b border-gray-200 dark:border-gray-700 sticky top-0 bg-white dark:bg-gray-800 z-10">