feat(media): enable full page drag and drop for all media types with progress bar
Deploy Canina / deploy (push) Successful in 59s
Deploy Canina / deploy (push) Successful in 59s
This commit is contained in:
1 parent
813c96742d
commit
387519ff6b
2 files changed
+35
-8
No files matched your search
@@ -257,7 +257,26 @@ export default function MediaManager() {
|
||||
const totalSize = mediaList.reduce((sum, m) => sum + m.size, 0);
|
||||
|
||||
return (
|
||||
<div className="space-y-6 font-vazir" dir="rtl">
|
||||
<div
|
||||
className="space-y-6 font-vazir relative min-h-[80vh]"
|
||||
dir="rtl"
|
||||
onDragOver={(e) => { e.preventDefault(); setIsDragOver(true); }}
|
||||
onDragLeave={(e) => {
|
||||
if (!e.currentTarget.contains(e.relatedTarget as Node)) {
|
||||
setIsDragOver(false);
|
||||
}
|
||||
}}
|
||||
onDrop={handleDrop}
|
||||
>
|
||||
{/* Full Page Drag & Drop Overlay */}
|
||||
{isDragOver && (
|
||||
<div className="fixed inset-0 z-50 bg-purple-600/90 backdrop-blur-xs flex flex-col items-center justify-center text-white pointer-events-none animate-in fade-in">
|
||||
<Upload className="w-16 h-16 mb-4 animate-bounce" />
|
||||
<p className="text-2xl font-black mb-2">فایلها را در هر جای صفحه رها کنید تا آپلود شوند</p>
|
||||
<p className="text-sm font-medium opacity-80">پشتیبانی از تصاویر، ویدئوها، پادکستهای صوتی و اسناد PDF</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
||||
<div>
|
||||
<h2 className="text-2xl font-black text-gray-900 flex items-center gap-2">
|
||||
|
||||
Reference in new issue
Block a user