78f4aa83e0
- Extract API helpers from UploadZone into lib/upload-api.ts (FormData builder, checkFolderDiffs, uploadDrive, uploadGit)
- Extract upload orchestration into hooks/useUploadOrchestrator.ts (UploadZone: 489 → 162 lines)
- Extract file diff classification into lib/diff-files.ts (from git route)
- Extract shared SVG icons into components/ui/icons.tsx (7 icons, 0 duplication)
- Extract shared modal wrapper into components/ui/Modal.tsx + ModalActions
- Extract DriveStatusLine sub-component from FolderCard
- Fix checkFolderDiffs silently swallowing auth/network errors (now throws)
- Fix type safety: remove as never casts, add isHttpError type guard, use discriminated union for validateFolder
- Fix nextcloud: cache getConfig, add max bound to findNextVersion, optimize mkdirRecursive (skip PROPFIND)
- Fix drive route: remove req.clone(), extend parseMultiUpload to return extra fields
- Fix commit message: model shown as unchanged with ↔️ on updates (not falsely marked as modified)
- Clean dead code: unused folderExists import, FileStatus/DriveStatus exports, ParsedFile.textureName, getConfig basePath
- Add security headers in next.config.ts (HSTS, X-Content-Type-Options, X-Frame-Options, etc.)
- Update README with new project structure
19 lines
539 B
TypeScript
19 lines
539 B
TypeScript
import { WarningIcon } from '@/components/ui/icons'
|
|
|
|
interface WarningBannerProps {
|
|
warnings: string[]
|
|
}
|
|
|
|
export default function WarningBanner({ warnings }: WarningBannerProps) {
|
|
if (warnings.length === 0) return null
|
|
|
|
return (
|
|
<div className="mt-2 px-3 py-2 bg-yellow-900/20 border border-yellow-700/30 rounded-lg">
|
|
<div className="flex items-center gap-2 text-xs text-yellow-400">
|
|
<WarningIcon className="w-4 h-4" />
|
|
<span>Textures manquantes : {warnings.join(', ')}</span>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|