Merge pull request #358 from EdouardVanbelle/feat/dropzone-only-on-files-section

This commit is contained in:
Dionisio Pozo
2026-05-11 18:08:11 +02:00
committed by GitHub
16 changed files with 53 additions and 17 deletions
+8 -2
View File
@@ -437,11 +437,11 @@ const ui = {
}, 500);
});
// Document-wide drag and drop
// Document-wide drag and drop — only active in the Files section
document.addEventListener('dragover', (e) => {
e.preventDefault();
if (!e.dataTransfer) return;
if (e.dataTransfer.types.includes('Files')) {
if (e.dataTransfer.types.includes('Files') && app.currentSection === 'files') {
dropzone?.classList.remove('hidden');
dropzone?.classList.add('active');
}
@@ -466,6 +466,12 @@ const ui = {
if (handledDropEvents.has(e)) return;
if (!e.dataTransfer) return;
if (app.currentSection !== 'files') {
if (e.dataTransfer.types.includes('Files')) {
this.showNotification(i18n.t('notifications.upload_files_section_title'), i18n.t('notifications.upload_files_section_body'));
}
return;
}
if (e.dataTransfer.files.length > 0) {
// First try directory-aware extraction (Finder folder drag & drop)
const droppedEntries = await collectDroppedEntries(e.dataTransfer);
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "الإشعارات",
"empty": "لا توجد إشعارات",
"link_created": "تم إنشاء الرابط",
"share_success": "تم إنشاء رابط المشاركة بنجاح"
"share_success": "تم إنشاء رابط المشاركة بنجاح",
"upload_files_section_title": "التحميل غير متاح هنا",
"upload_files_section_body": "انتقل إلى قسم الملفات لتحميل الملفات"
},
"batch": {
"one_selected": "عنصر واحد محدد",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Benachrichtigungen",
"empty": "Keine Benachrichtigungen",
"link_created": "Link erstellt",
"share_success": "Freigabelink erfolgreich erstellt"
"share_success": "Freigabelink erfolgreich erstellt",
"upload_files_section_title": "Upload hier nicht verfügbar",
"upload_files_section_body": "Wechseln Sie zum Abschnitt Dateien, um Dateien hochzuladen"
},
"batch": {
"one_selected": "1 Element ausgewählt",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Notifications",
"empty": "No notifications",
"link_created": "Link created",
"share_success": "Shared link created successfully"
"share_success": "Shared link created successfully",
"upload_files_section_title": "Upload not available here",
"upload_files_section_body": "Go to the Files section to upload files"
},
"batch": {
"one_selected": "1 item selected",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Notificaciones",
"empty": "Sin notificaciones",
"link_created": "Enlace creado",
"share_success": "Enlace compartido creado correctamente"
"share_success": "Enlace compartido creado correctamente",
"upload_files_section_title": "Subida no disponible aquí",
"upload_files_section_body": "Ve a la sección Archivos para subir archivos"
},
"batch": {
"one_selected": "1 elemento seleccionado",
+3 -1
View File
@@ -673,7 +673,9 @@
"title": "اعلان‌ها",
"empty": "بدون اعلان",
"link_created": "پیوند ایجاد شد",
"share_success": "پیوند اشتراک‌گذاری با موفقیت ایجاد شد"
"share_success": "پیوند اشتراک‌گذاری با موفقیت ایجاد شد",
"upload_files_section_title": "بارگذاری اینجا در دسترس نیست",
"upload_files_section_body": "برای بارگذاری فایل‌ها به بخش فایل‌ها بروید"
},
"upload": {
"uploading": "در حال آپلود...",
+3 -1
View File
@@ -443,7 +443,9 @@
"empty": "No notifications",
"title": "Notifications",
"link_created": "Lien créé",
"share_success": "Lien de partage créé avec succès"
"share_success": "Lien de partage créé avec succès",
"upload_files_section_title": "Dépôt non disponible ici",
"upload_files_section_body": "Accédez à la section Fichiers pour déposer des fichiers"
},
"batch": {
"one_selected": "1 élément sélectionné",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "सूचनाएँ",
"empty": "कोई सूचना नहीं",
"link_created": "लिंक बनाया गया",
"share_success": "शेयर लिंक सफलतापूर्वक बनाया गया"
"share_success": "शेयर लिंक सफलतापूर्वक बनाया गया",
"upload_files_section_title": "यहाँ अपलोड उपलब्ध नहीं है",
"upload_files_section_body": "फ़ाइलें अपलोड करने के लिए फ़ाइलें अनुभाग पर जाएँ"
},
"batch": {
"one_selected": "1 आइटम चयनित",
+3 -1
View File
@@ -443,7 +443,9 @@
"empty": "No notifications",
"title": "Notifications",
"link_created": "Link creato",
"share_success": "Link di condivisione creato con successo"
"share_success": "Link di condivisione creato con successo",
"upload_files_section_title": "Caricamento non disponibile qui",
"upload_files_section_body": "Vai alla sezione File per caricare i file"
},
"batch": {
"one_selected": "1 elemento selezionato",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "通知",
"empty": "通知はありません",
"link_created": "リンクを作成しました",
"share_success": "共有リンクを正常に作成しました"
"share_success": "共有リンクを正常に作成しました",
"upload_files_section_title": "ここではアップロードできません",
"upload_files_section_body": "ファイルをアップロードするには「ファイル」セクションに移動してください"
},
"batch": {
"one_selected": "1件選択中",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "알림",
"empty": "알림이 없습니다",
"link_created": "링크 생성됨",
"share_success": "공유 링크가 성공적으로 생성되었습니다"
"share_success": "공유 링크가 성공적으로 생성되었습니다",
"upload_files_section_title": "여기서는 업로드할 수 없습니다",
"upload_files_section_body": "파일을 업로드하려면 파일 섹션으로 이동하세요"
},
"batch": {
"one_selected": "1개 선택됨",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Notificaties",
"empty": "Geen notificaties",
"link_created": "Link aangemaakt",
"share_success": "Deellink succesvol aangemaakt"
"share_success": "Deellink succesvol aangemaakt",
"upload_files_section_title": "Uploaden hier niet beschikbaar",
"upload_files_section_body": "Ga naar de sectie Bestanden om bestanden te uploaden"
},
"batch": {
"one_selected": "1 item geselecteerd",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Powiadomienia",
"empty": "Brak powiadomień",
"link_created": "Link utworzony",
"share_success": "Link udostępniania utworzony pomyślnie"
"share_success": "Link udostępniania utworzony pomyślnie",
"upload_files_section_title": "Przesyłanie niedostępne tutaj",
"upload_files_section_body": "Przejdź do sekcji Pliki, aby przesłać pliki"
},
"batch": {
"one_selected": "Wybrano 1 element",
+3 -1
View File
@@ -443,7 +443,9 @@
"empty": "No notifications",
"title": "Notifications",
"link_created": "Link criado",
"share_success": "Link de partilha criado com sucesso"
"share_success": "Link de partilha criado com sucesso",
"upload_files_section_title": "Upload não disponível aqui",
"upload_files_section_body": "Vá para a seção Arquivos para enviar arquivos"
},
"batch": {
"one_selected": "1 item selecionado",
+3 -1
View File
@@ -443,7 +443,9 @@
"title": "Уведомления",
"empty": "Нет уведомлений",
"link_created": "Ссылка создана",
"share_success": "Ссылка для общего доступа успешно создана"
"share_success": "Ссылка для общего доступа успешно создана",
"upload_files_section_title": "Загрузка здесь недоступна",
"upload_files_section_body": "Перейдите в раздел «Файлы», чтобы загрузить файлы"
},
"batch": {
"one_selected": "Выбран 1 элемент",
+3 -1
View File
@@ -673,7 +673,9 @@
"title": "通知",
"empty": "暂无通知",
"link_created": "链接已创建",
"share_success": "分享链接创建成功"
"share_success": "分享链接创建成功",
"upload_files_section_title": "此处不支持上传",
"upload_files_section_body": "请前往文件部分上传文件"
},
"upload": {
"uploading": "正在上传...",