diff --git a/client/src/components/Journey/DawarichDayDialog.tsx b/client/src/components/Journey/DawarichDayDialog.tsx index 3210b1213..947386bd7 100644 --- a/client/src/components/Journey/DawarichDayDialog.tsx +++ b/client/src/components/Journey/DawarichDayDialog.tsx @@ -37,7 +37,6 @@ export default function DawarichDayDialog({ onClose={onClose} labelledBy={labelId} width="detail" - align="top" header={ - + diff --git a/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx b/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx index 22acd11f6..4b4b543f0 100644 --- a/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx +++ b/client/src/components/Journey/JourneyDetailPageEntryEditor.tsx @@ -234,7 +234,7 @@ export function EntryEditor({ entry, journeyId, tripDates, galleryPhotos, trips, <> {/* Pinned at the top: the photo panels, the verdict rows and the photo strip all change the body's height while an entry is being written. */} - +
diff --git a/client/src/components/Journey/JourneyDetailPageGalleryView.tsx b/client/src/components/Journey/JourneyDetailPageGalleryView.tsx index f6641d2e1..51d832523 100644 --- a/client/src/components/Journey/JourneyDetailPageGalleryView.tsx +++ b/client/src/components/Journey/JourneyDetailPageGalleryView.tsx @@ -69,11 +69,6 @@ export function GalleryView({ entries, gallery, journeyId, userId, trips, canEdi // Deleting is final on the server and takes the photo out of every entry that // uses it too, so the tile only asks; the dialog does the deleting (#2593). const [deleteTarget, setDeleteTarget] = useState(null) - const [showFromPhotos, setShowFromPhotos] = useState(false) - const coverOf = (galleryPhotoId: number) => { - const photo = allPhotos.find(p => p.id === galleryPhotoId) - return photo && !posterlessVideo(photo) ? photoUrl(photo, 'thumbnail') : null - } const handleDeletePhoto = async (galleryPhotoId: number) => { const store = useJourneyStore.getState() @@ -90,31 +85,11 @@ export function GalleryView({ entries, gallery, journeyId, userId, trips, canEdi
- {/* Header — the provider buttons live in the page header next to Upload */} -
+
{allPhotos.length} {t('journey.detail.photos', { count: allPhotos.length })} - {/* #1920: the gallery's loose photos as drafts, grouped by day and place. */} - {canEdit && allPhotos.length > 0 && ( - - )}
- {showFromPhotos && ( - setShowFromPhotos(false)} - /> - )} {allPhotos.length === 0 ? ( @@ -212,3 +187,38 @@ export function GalleryView({ entries, gallery, journeyId, userId, trips, canEdi
) } + +export function CreateEntriesFromPhotosButton({ journeyId, gallery, onCreated, className }: { + journeyId: number + gallery: GalleryPhoto[] + onCreated: () => void + className: string +}) { + const { t } = useTranslation() + const [open, setOpen] = useState(false) + + return ( + <> + + {open && ( + { + const photo = gallery.find(p => p.id === galleryPhotoId) + return photo && !posterlessVideo(photo) ? photoUrl(photo, 'thumbnail') : null + }} + onCreated={onCreated} + onClose={() => setOpen(false)} + /> + )} + + ) +} diff --git a/client/src/components/Journey/JourneyMapLayerControl.tsx b/client/src/components/Journey/JourneyMapLayerControl.tsx index 10274e9bd..a7d55ed0e 100644 --- a/client/src/components/Journey/JourneyMapLayerControl.tsx +++ b/client/src/components/Journey/JourneyMapLayerControl.tsx @@ -278,7 +278,7 @@ export default function JourneyMapLayerControl({ style={FROSTED_SHELL} role="group" aria-label={t('journey.map.layers')} - className="max-w-full gap-0.5 overflow-x-auto" + className="max-w-full gap-1 overflow-x-auto" > {layers.controls.map((control) => ( ))} - + {live} diff --git a/client/src/pages/JourneyDetailPage.tsx b/client/src/pages/JourneyDetailPage.tsx index 75aa827a5..d84ce0c5f 100644 --- a/client/src/pages/JourneyDetailPage.tsx +++ b/client/src/pages/JourneyDetailPage.tsx @@ -26,7 +26,7 @@ import { computeJourneyLifecycle } from '../utils/journeyLifecycle' import { useJourneyDetail, type JourneyDetailOptions } from './journeyDetail/useJourneyDetail' import { createDraftJourneyEntry, pickGradient, groupByDate, formatDate, photoUrl, matchJourneyEntries } from './journeyDetail/JourneyDetailPage.helpers' import { EntryCard, SkeletonCard, CheckinCard } from '../components/Journey/JourneyDetailPageEntryCard' -import { GalleryView } from '../components/Journey/JourneyDetailPageGalleryView' +import { CreateEntriesFromPhotosButton, GalleryView } from '../components/Journey/JourneyDetailPageGalleryView' import { EntryEditor } from '../components/Journey/JourneyDetailPageEntryEditor' import { AddTripDialog } from '../components/Journey/JourneyDetailPageAddTripDialog' import { JourneySettingsDialog } from '../components/Journey/JourneyDetailPageSettingsDialog' @@ -34,6 +34,8 @@ import HelpAnchor from '../components/Help/HelpAnchor' import JourneyDayJump from '../components/Journey/JourneyDayJump' import { MemberEntryComments } from '../components/Journey/JourneyEntryComments' +const GALLERY_ACTION_BUTTON = 'inline-flex h-9 items-center gap-1.5 whitespace-nowrap rounded-full px-4 text-[13px] font-semibold transition-transform hover:-translate-y-0.5' + export default function JourneyDetailPage() { // ViewportRoute in App.tsx picks the branch now, so the phone screen is a // chunk of its own instead of a dead limb in this one. @@ -147,12 +149,12 @@ export function JourneyDetailPageDesktop({ journeyId, embedded = false }: Journe // the gallery takes the actions over there instead. Exactly one host renders // them, never both. const galleryActions = canEditEntries && view === 'gallery' ? ( -
+
{galleryProviders.map(p => ( + {!!current.gallery?.length && ( + loadJourney(Number(id))} + className={GALLERY_ACTION_BUTTON} + /> + )}
) : null @@ -456,7 +466,7 @@ export function JourneyDetailPageDesktop({ journeyId, embedded = false }: Journe value={query} onChange={e => setQuery(e.target.value)} placeholder={t('journey.detail.searchPlaceholder')} - className="min-w-0 flex-1 bg-transparent text-[12.5px] outline-none" + className="min-w-0 flex-1 !bg-transparent text-[12.5px] outline-none" style={{ color: 'var(--vg-ink)' }} /> {query && ( diff --git a/client/src/pages/JourneyPage.tsx b/client/src/pages/JourneyPage.tsx index 11c587a62..702fd0e1c 100644 --- a/client/src/pages/JourneyPage.tsx +++ b/client/src/pages/JourneyPage.tsx @@ -353,8 +353,7 @@ function CreateJourneyDialog({ title, onTitleChange, subtitle, onSubtitleChange, ) return ( - // Pinned at the top: the trips arrive after the dialog opens and grow the body. - +