diff --git a/client/src/i18n/translations/ar.ts b/client/src/i18n/translations/ar.ts index a15e801d..e77b0d47 100644 --- a/client/src/i18n/translations/ar.ts +++ b/client/src/i18n/translations/ar.ts @@ -1569,6 +1569,7 @@ const ar: Record = { // Journey Entry Editor 'journey.editor.uploadPhotos': 'رفع صور', + 'journey.editor.uploading': '...جارٍ الرفع', 'journey.editor.fromGallery': 'من المعرض', 'journey.editor.addAnother': 'إضافة آخر', 'journey.editor.makeFirst': 'جعله الأول', diff --git a/client/src/i18n/translations/br.ts b/client/src/i18n/translations/br.ts index 9bb4d00e..448815e2 100644 --- a/client/src/i18n/translations/br.ts +++ b/client/src/i18n/translations/br.ts @@ -1902,6 +1902,7 @@ const br: Record = { 'journey.synced.places': 'lugares', 'journey.synced.synced': 'sincronizado', 'journey.editor.uploadPhotos': 'Enviar fotos', + 'journey.editor.uploading': 'Enviando...', 'journey.editor.fromGallery': 'Da galeria', 'journey.editor.allPhotosAdded': 'Todas as fotos já foram adicionadas', 'journey.editor.writeStory': 'Escreva sua história...', diff --git a/client/src/i18n/translations/cs.ts b/client/src/i18n/translations/cs.ts index dc07ce84..f9250361 100644 --- a/client/src/i18n/translations/cs.ts +++ b/client/src/i18n/translations/cs.ts @@ -1907,6 +1907,7 @@ const cs: Record = { 'journey.synced.places': 'místa', 'journey.synced.synced': 'synchronizováno', 'journey.editor.uploadPhotos': 'Nahrát fotky', + 'journey.editor.uploading': 'Nahrávání...', 'journey.editor.fromGallery': 'Z galerie', 'journey.editor.allPhotosAdded': 'Všechny fotky již přidány', 'journey.editor.writeStory': 'Napište svůj příběh...', diff --git a/client/src/i18n/translations/de.ts b/client/src/i18n/translations/de.ts index 6aa8fc92..2ff65611 100644 --- a/client/src/i18n/translations/de.ts +++ b/client/src/i18n/translations/de.ts @@ -1908,6 +1908,7 @@ const de: Record = { 'journey.synced.places': 'Orte', 'journey.synced.synced': 'synchronisiert', 'journey.editor.uploadPhotos': 'Fotos hochladen', + 'journey.editor.uploading': 'Hochladen...', 'journey.editor.fromGallery': 'Aus Galerie', 'journey.editor.allPhotosAdded': 'Alle Fotos bereits hinzugefügt', 'journey.editor.writeStory': 'Erzähle deine Geschichte...', diff --git a/client/src/i18n/translations/en.ts b/client/src/i18n/translations/en.ts index b331ff76..886c4213 100644 --- a/client/src/i18n/translations/en.ts +++ b/client/src/i18n/translations/en.ts @@ -1919,6 +1919,7 @@ const en: Record = { // Journey Entry Editor 'journey.editor.uploadPhotos': 'Upload photos', + 'journey.editor.uploading': 'Uploading...', 'journey.editor.fromGallery': 'From Gallery', 'journey.editor.allPhotosAdded': 'All photos already added', 'journey.editor.writeStory': 'Write your story...', diff --git a/client/src/i18n/translations/es.ts b/client/src/i18n/translations/es.ts index 871f53a6..5f3c4b17 100644 --- a/client/src/i18n/translations/es.ts +++ b/client/src/i18n/translations/es.ts @@ -1909,6 +1909,7 @@ const es: Record = { 'journey.synced.places': 'lugares', 'journey.synced.synced': 'sincronizado', 'journey.editor.uploadPhotos': 'Subir fotos', + 'journey.editor.uploading': 'Subiendo...', 'journey.editor.fromGallery': 'Desde galería', 'journey.editor.allPhotosAdded': 'Todas las fotos ya fueron añadidas', 'journey.editor.writeStory': 'Escribe tu historia...', diff --git a/client/src/i18n/translations/fr.ts b/client/src/i18n/translations/fr.ts index f6e4f7a7..88bda0bd 100644 --- a/client/src/i18n/translations/fr.ts +++ b/client/src/i18n/translations/fr.ts @@ -1903,6 +1903,7 @@ const fr: Record = { 'journey.synced.places': 'lieux', 'journey.synced.synced': 'synchronisé', 'journey.editor.uploadPhotos': 'Téléverser des photos', + 'journey.editor.uploading': 'Envoi...', 'journey.editor.fromGallery': 'Depuis la galerie', 'journey.editor.allPhotosAdded': 'Toutes les photos ont déjà été ajoutées', 'journey.editor.writeStory': 'Écrivez votre histoire...', diff --git a/client/src/i18n/translations/hu.ts b/client/src/i18n/translations/hu.ts index d531e555..4fdc8f31 100644 --- a/client/src/i18n/translations/hu.ts +++ b/client/src/i18n/translations/hu.ts @@ -1904,6 +1904,7 @@ const hu: Record = { 'journey.synced.places': 'helyszín', 'journey.synced.synced': 'szinkronizálva', 'journey.editor.uploadPhotos': 'Fotók feltöltése', + 'journey.editor.uploading': 'Feltöltés...', 'journey.editor.fromGallery': 'Galériából', 'journey.editor.allPhotosAdded': 'Minden fotó már hozzáadva', 'journey.editor.writeStory': 'Írd meg a történeted...', diff --git a/client/src/i18n/translations/it.ts b/client/src/i18n/translations/it.ts index f299587a..a781535f 100644 --- a/client/src/i18n/translations/it.ts +++ b/client/src/i18n/translations/it.ts @@ -1904,6 +1904,7 @@ const it: Record = { 'journey.synced.places': 'luoghi', 'journey.synced.synced': 'sincronizzato', 'journey.editor.uploadPhotos': 'Carica foto', + 'journey.editor.uploading': 'Caricamento...', 'journey.editor.fromGallery': 'Dalla galleria', 'journey.editor.allPhotosAdded': 'Tutte le foto sono già state aggiunte', 'journey.editor.writeStory': 'Scrivi la tua storia...', diff --git a/client/src/i18n/translations/nl.ts b/client/src/i18n/translations/nl.ts index a1b64958..a8726b42 100644 --- a/client/src/i18n/translations/nl.ts +++ b/client/src/i18n/translations/nl.ts @@ -1903,6 +1903,7 @@ const nl: Record = { 'journey.synced.places': 'plaatsen', 'journey.synced.synced': 'gesynchroniseerd', 'journey.editor.uploadPhotos': 'Foto\'s uploaden', + 'journey.editor.uploading': 'Uploaden...', 'journey.editor.fromGallery': 'Uit galerij', 'journey.editor.allPhotosAdded': 'Alle foto\'s al toegevoegd', 'journey.editor.writeStory': 'Schrijf je verhaal...', diff --git a/client/src/i18n/translations/pl.ts b/client/src/i18n/translations/pl.ts index 4c741397..45c83dde 100644 --- a/client/src/i18n/translations/pl.ts +++ b/client/src/i18n/translations/pl.ts @@ -1896,6 +1896,7 @@ const pl: Record = { 'journey.synced.places': 'miejsca', 'journey.synced.synced': 'zsynchronizowane', 'journey.editor.uploadPhotos': 'Prześlij zdjęcia', + 'journey.editor.uploading': 'Przesyłanie...', 'journey.editor.fromGallery': 'Z galerii', 'journey.editor.allPhotosAdded': 'Wszystkie zdjęcia już dodane', 'journey.editor.writeStory': 'Napisz swoją historię...', diff --git a/client/src/i18n/translations/ru.ts b/client/src/i18n/translations/ru.ts index d7e4e9cd..8fc08565 100644 --- a/client/src/i18n/translations/ru.ts +++ b/client/src/i18n/translations/ru.ts @@ -1903,6 +1903,7 @@ const ru: Record = { 'journey.synced.places': 'мест', 'journey.synced.synced': 'синхронизировано', 'journey.editor.uploadPhotos': 'Загрузить фото', + 'journey.editor.uploading': 'Загрузка...', 'journey.editor.fromGallery': 'Из галереи', 'journey.editor.allPhotosAdded': 'Все фото уже добавлены', 'journey.editor.writeStory': 'Напишите свою историю...', diff --git a/client/src/i18n/translations/zh.ts b/client/src/i18n/translations/zh.ts index 2a8d43d1..d998b5c0 100644 --- a/client/src/i18n/translations/zh.ts +++ b/client/src/i18n/translations/zh.ts @@ -1903,6 +1903,7 @@ const zh: Record = { 'journey.synced.places': '个地点', 'journey.synced.synced': '已同步', 'journey.editor.uploadPhotos': '上传照片', + 'journey.editor.uploading': '上传中...', 'journey.editor.fromGallery': '从相册', 'journey.editor.allPhotosAdded': '所有照片已添加', 'journey.editor.writeStory': '写下你的故事...', diff --git a/client/src/i18n/translations/zhTw.ts b/client/src/i18n/translations/zhTw.ts index 78231de5..76612034 100644 --- a/client/src/i18n/translations/zhTw.ts +++ b/client/src/i18n/translations/zhTw.ts @@ -1863,6 +1863,7 @@ const zhTw: Record = { 'journey.synced.places': '個地點', 'journey.synced.synced': '已同步', 'journey.editor.uploadPhotos': '上傳照片', + 'journey.editor.uploading': '上傳中...', 'journey.editor.fromGallery': '從相簿', 'journey.editor.allPhotosAdded': '所有照片已新增', 'journey.editor.writeStory': '寫下你的故事...', diff --git a/client/src/pages/JourneyDetailPage.tsx b/client/src/pages/JourneyDetailPage.tsx index e8307f11..ba69b1f7 100644 --- a/client/src/pages/JourneyDetailPage.tsx +++ b/client/src/pages/JourneyDetailPage.tsx @@ -772,6 +772,7 @@ function GalleryView({ entries, journeyId, userId, trips, onPhotoClick, onRefres const [showPicker, setShowPicker] = useState(false) const [pickerProvider, setPickerProvider] = useState(null) const [availableProviders, setAvailableProviders] = useState<{ id: string; name: string }[]>([]) + const [galleryUploading, setGalleryUploading] = useState(false) const toast = useToast() // check which providers are enabled AND connected for the current user @@ -816,27 +817,28 @@ function GalleryView({ entries, journeyId, userId, trips, onPhotoClick, onRefres const handleGalleryUpload = async (e: React.ChangeEvent) => { const files = e.target.files if (!files?.length) return - // find existing "Gallery" entry or create one - let galleryEntry = entries.find(e => e.title === 'Gallery' && e.type === 'entry') - let entryId = galleryEntry?.id - if (!entryId) { - try { + setGalleryUploading(true) + try { + // find existing "Gallery" entry or create one + let galleryEntry = entries.find(e => e.title === 'Gallery' && e.type === 'entry') + let entryId = galleryEntry?.id + if (!entryId) { const entry = await journeyApi.createEntry(journeyId, { title: t('journey.share.gallery'), entry_date: new Date().toISOString().split('T')[0], type: 'entry', }) entryId = entry.id - } catch { return } - } - const formData = new FormData() - for (const f of files) formData.append('photos', f) - try { + } + const formData = new FormData() + for (const f of files) formData.append('photos', f) await journeyApi.uploadPhotos(entryId, formData) toast.success(t('journey.photosUploaded', { count: files.length })) onRefresh() } catch { toast.error(t('journey.settings.coverFailed')) + } finally { + setGalleryUploading(false) } e.target.value = '' } @@ -874,10 +876,14 @@ function GalleryView({ entries, journeyId, userId, trips, onPhotoClick, onRefres
{availableProviders.map(p => ( {galleryPhotos.length > 0 && (