From c414c2718d8ad04a2fec7e4b502fc57bf6836d0f Mon Sep 17 00:00:00 2001 From: mARTin Date: Mon, 13 Apr 2026 12:46:27 +0200 Subject: [PATCH] fix: move weather from day header to time-grid cell (top-right chip) Matches webapp behaviour where weather appears as a chip in the top-right corner of each day's time grid area, not inside the day header. v1.96.2 --- package.json | 2 +- src/app/api/user/export-week-view/route.ts | 28 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 2d244e4..9549313 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.96.1", + "version": "1.96.2", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/app/api/user/export-week-view/route.ts b/src/app/api/user/export-week-view/route.ts index be9144b..dfe822b 100644 --- a/src/app/api/user/export-week-view/route.ts +++ b/src/app/api/user/export-week-view/route.ts @@ -448,9 +448,6 @@ function WeekCalendarPDF({ marginTop: 1, }, }, dayName), - wLabel ? React.createElement(Text, { - style: { fontSize: 6, color: MUTED, textAlign: 'center', marginTop: 1 }, - }, wLabel) : null, ), // ── All-day cell (external calendar events) @@ -536,9 +533,30 @@ function WeekCalendarPDF({ }) ), + // Weather chip: top-right of the time grid, matching webapp hour-cell style + ...(wLabel ? [ + React.createElement(View, { + key: 'weather', + style: { + position: 'absolute', + top: 3, right: 3, + backgroundColor: 'rgba(255,255,255,0.88)', + borderRadius: 4, + paddingVertical: 1.5, + paddingHorizontal: 4, + flexDirection: 'row', + alignItems: 'center', + }, + }, + React.createElement(Text, { + style: { fontSize: 6, color: '#64748b', fontFamily: 'Helvetica-Bold' }, + }, wLabel), + ), + ] : []), + // Task blocks: - // User tasks → white bg + thin colored left border (clean/minimal) - // Calendar events → light tinted bg + colored left border (boxed) + // User tasks → transparent + optional colored left border (project only) + // Calendar events → light tinted bg + colored left border + rounded corners ...timedTasks.map(t => { const startMins = parseTimeMinutes(t.startTime)!; const endMins = t.endTime