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
This commit is contained in:
mARTin 2026-04-13 12:46:27 +02:00
parent 38462c50f7
commit c414c2718d
2 changed files with 24 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "my-weekly-todo-list", "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", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -448,9 +448,6 @@ function WeekCalendarPDF({
marginTop: 1, marginTop: 1,
}, },
}, dayName), }, dayName),
wLabel ? React.createElement(Text, {
style: { fontSize: 6, color: MUTED, textAlign: 'center', marginTop: 1 },
}, wLabel) : null,
), ),
// ── All-day cell (external calendar events) // ── 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: // Task blocks:
// User tasks → white bg + thin colored left border (clean/minimal) // User tasks → transparent + optional colored left border (project only)
// Calendar events → light tinted bg + colored left border (boxed) // Calendar events → light tinted bg + colored left border + rounded corners
...timedTasks.map(t => { ...timedTasks.map(t => {
const startMins = parseTimeMinutes(t.startTime)!; const startMins = parseTimeMinutes(t.startTime)!;
const endMins = t.endTime const endMins = t.endTime