Fix map tooltips, journey creation, and contributor avatars

- Map tooltips now respect light/dark mode via CSS variables
- Journey creation inherits cover image from first selected trip
- Only day-assigned places are synced to journey (no unplanned places)
- Place count in trip picker reflects assigned places only
- Contributor avatars shown in journey detail page
- Suggestion banner button visible in dark mode (!important override)
- Dashboard list view uses correct trips array and status label
This commit is contained in:
Maurice
2026-04-12 23:20:13 +02:00
parent 7abfb4deba
commit 4680aa254d
6 changed files with 42 additions and 20 deletions
+2 -2
View File
@@ -299,7 +299,7 @@ body {
/* ── iOS-style map tooltip ─────────────────────── */
.leaflet-tooltip.map-tooltip {
background: rgba(9, 9, 11, 0.85);
background: var(--tooltip-bg);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: none;
@@ -310,7 +310,7 @@ body {
font-size: 11px;
font-weight: 500;
pointer-events: none;
color: #fff;
color: var(--text-primary);
}
.leaflet-tooltip.map-tooltip::before,
.leaflet-tooltip-left.map-tooltip::before,
+3 -3
View File
@@ -524,7 +524,7 @@ function TripListItem({ trip, onEdit, onCopy, onDelete, onArchive, onClick, t, l
: status === 'today' ? t('dashboard.status.today')
: status === 'tomorrow' ? t('dashboard.status.tomorrow')
: status === 'future' ? t('dashboard.status.daysLeft', { count: daysUntil(trip.start_date) })
: t('dashboard.status.past')}
: t('dashboard.mobile.completed')}
</span>
)}
</div>
@@ -1065,7 +1065,7 @@ export default function DashboardPage(): React.ReactElement {
)}
{/* Trips — desktop grid or list */}
{!isLoading && (viewMode === 'grid' ? rest : rest).length > 0 && (
{!isLoading && (viewMode === 'grid' ? rest : trips).length > 0 && (
viewMode === 'grid' ? (
<div className="trip-grid hidden md:grid" style={{ gap: 16, marginBottom: 40 }}>
{rest.map(trip => (
@@ -1083,7 +1083,7 @@ export default function DashboardPage(): React.ReactElement {
</div>
) : (
<div className="hidden md:flex" style={{ flexDirection: 'column', gap: 8, marginBottom: 40 }}>
{rest.map(trip => (
{trips.map(trip => (
<TripListItem
key={trip.id}
trip={trip}
+7 -3
View File
@@ -471,9 +471,13 @@ export default function JourneyDetailPage() {
<div className="flex flex-col gap-2.5">
{current.contributors.map((c: any) => (
<div key={c.user_id} className="flex items-center gap-2.5">
<div className="w-7 h-7 rounded-full bg-zinc-900 dark:bg-white text-white dark:text-zinc-900 flex items-center justify-center text-[11px] font-semibold">
{(c.username || '?')[0].toUpperCase()}
</div>
{c.avatar_url ? (
<img src={c.avatar_url} className="w-7 h-7 rounded-full object-cover" alt="" />
) : (
<div className="w-7 h-7 rounded-full bg-zinc-900 dark:bg-white text-white dark:text-zinc-900 flex items-center justify-center text-[11px] font-semibold">
{(c.username || '?')[0].toUpperCase()}
</div>
)}
<div className="flex-1 min-w-0">
<div className="text-xs font-medium text-zinc-900 dark:text-white">{c.username}</div>
</div>
+6 -2
View File
@@ -158,7 +158,7 @@ export default function JourneyPage() {
</button>
<button
onClick={() => openCreateModal(activeSuggestion.id)}
className="px-3 py-1.5 rounded-lg bg-white text-zinc-900 text-[12px] font-medium hover:bg-zinc-100"
className="px-3 py-1.5 rounded-lg !bg-white !text-zinc-900 text-[12px] font-medium hover:!bg-zinc-100"
>
{t('journey.frontpage.createJourney')}
</button>
@@ -336,7 +336,11 @@ export default function JourneyPage() {
}`}>
{selected && <Check size={12} className="text-white dark:text-zinc-900" />}
</div>
<div className="w-12 h-12 rounded-lg flex-shrink-0" style={{ background: pickGradient(trip.id) }} />
<div className="w-12 h-12 rounded-lg flex-shrink-0 overflow-hidden" style={{ background: pickGradient(trip.id) }}>
{trip.cover_image && (
<img src={trip.cover_image} className="w-full h-full object-cover" alt="" />
)}
</div>
<div className="flex-1 min-w-0">
<div className="text-[14px] font-semibold text-zinc-900 dark:text-white">{trip.title}</div>
<div className="text-[12px] text-zinc-500 flex items-center gap-2.5 mt-0.5">