import { AlertTriangle, FolderOpen, Plus, RefreshCw } from 'lucide-react'; /** * 素材库路径丢失弹窗 * 两种状态: * - missing_index: 文件夹存在但索引不存在(可重新扫描) * - missing_folder: 文件夹不存在(只能打开其他或新建) */ function LibraryMissingModal({ isOpen, libraryName, libraryPath, status, // 'missing_index' | 'missing_folder' onRescan, onOpenOther, onCreateNew }) { if (!isOpen) return null; const isMissingIndex = status === 'missing_index'; const title = isMissingIndex ? '素材库索引丢失' : '打开资源库失败'; return (
{/* 左侧内容 */}
{/* 标题 */}

{title}

{/* 描述 */}
{isMissingIndex ? ( <>

素材库 {libraryName} 的索引数据已丢失。

路径: {libraryPath}

图片文件夹仍然存在,您可以重新扫描来重建索引。

) : ( <>

在这个位置的资源库( {libraryPath} ) 打开失败,可能是因为路径已经变化,或者资源库链接错误。

如果您更改过资源库位置,可以{' '} {' '}打开

)}
{/* 分隔线 */}
{isMissingIndex ? '请选择操作:' : '您也可以:'}
{/* 操作按钮 */}
{isMissingIndex && ( )}
{/* 右侧插图 */}
{/* 简化的插图:房子和警告标志 */} {/* 房子 */} {/* 门 */} {/* 窗户 */} {/* 警告三角 */} !
); } export default LibraryMissingModal;