From 05dab0720b514a09fa587622fd13a2c52de2e1a9 Mon Sep 17 00:00:00 2001 From: mARTin Date: Sun, 8 Mar 2026 13:09:37 +0100 Subject: [PATCH] feat: provider icons in time grid, fix weekday names persistence, calendar z-index - Add sync provider icons (Google, Microsoft, Apple, Synology) to GridTaskBlock so they show in weekday time slots - Add weekdayFormat and customWeekdayNames fields to Prisma schema and profile API so custom weekday names persist across reloads - Fix Jump to Date calendar z-index by elevating container when open - Fix someday textarea font to inherit from CSS instead of hardcoded values v1.18.0 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- prisma/schema.prisma | 2 ++ src/app/api/user/profile/route.ts | 8 +++++++- src/components/GridTaskBlock.tsx | 26 +++++++++++++++++++++++++- src/components/WeeklyView.tsx | 6 +++--- 5 files changed, 38 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5272bd0..61fae9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.17.2", + "version": "1.18.0", "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/prisma/schema.prisma b/prisma/schema.prisma index 9a20d6c..d341302 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -92,6 +92,8 @@ model User { accountNumber Int @unique @default(autoincrement()) showCompletedTasks Boolean @default(true) showLines Boolean @default(true) + weekdayFormat String? @default("long") + customWeekdayNames String? @default("") startDayOffset Int @default(-1) quoteSourceUrls String[] @default([]) accounts Account[] diff --git a/src/app/api/user/profile/route.ts b/src/app/api/user/profile/route.ts index d32635b..02331cf 100644 --- a/src/app/api/user/profile/route.ts +++ b/src/app/api/user/profile/route.ts @@ -83,6 +83,8 @@ export async function GET(request: NextRequest) { showCompletedTasks: true, showLines: true, startDayOffset: true, + weekdayFormat: true, + customWeekdayNames: true, quoteSourceUrls: true, accountNumber: true, createdAt: true @@ -126,7 +128,7 @@ export async function PATCH(request: NextRequest) { cwFontFamily, cwFontSize, cwFontWeight, cwColor, yearFontFamily, yearFontSize, yearFontWeight, yearColor, showTaskCheckboxes, dayHeaderGap, - showCompletedTasks, showLines, startDayOffset, quoteSourceUrls + showCompletedTasks, showLines, startDayOffset, weekdayFormat, customWeekdayNames, quoteSourceUrls } = body; const updateData: any = { @@ -199,6 +201,8 @@ export async function PATCH(request: NextRequest) { ...(showCompletedTasks !== undefined && { showCompletedTasks }), ...(showLines !== undefined && { showLines }), ...(startDayOffset !== undefined && { startDayOffset }), + ...(weekdayFormat !== undefined && { weekdayFormat }), + ...(customWeekdayNames !== undefined && { customWeekdayNames }), ...(quoteSourceUrls !== undefined && { quoteSourceUrls }), }; if (password && password.trim() !== "") { @@ -280,6 +284,8 @@ export async function PATCH(request: NextRequest) { showCompletedTasks: true, showLines: true, startDayOffset: true, + weekdayFormat: true, + customWeekdayNames: true, quoteSourceUrls: true, accountNumber: true, } diff --git a/src/components/GridTaskBlock.tsx b/src/components/GridTaskBlock.tsx index cd93679..f7a9b99 100644 --- a/src/components/GridTaskBlock.tsx +++ b/src/components/GridTaskBlock.tsx @@ -1,5 +1,8 @@ import React, { useState, useRef, useEffect } from "react"; import { Repeat, Circle, X } from "lucide-react"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faGoogle, faMicrosoft, faApple } from "@fortawesome/free-brands-svg-icons"; +import { faServer } from "@fortawesome/free-solid-svg-icons"; import { Task } from "./WeeklyView"; interface GridTaskBlockProps { @@ -271,7 +274,28 @@ export function GridTaskBlock({ )} {task.title} - + {(() => { + const provider = task.externalProvider + || (task.externalId?.startsWith("synology::") ? "synology" : null); + if (!provider) return null; + const iconMap: Record = { + google: { icon: faGoogle, color: "#4285F4", label: "Google" }, + outlook: { icon: faMicrosoft, color: "#0078D4", label: "Microsoft" }, + apple: { icon: faApple, color: "#555", label: "Apple" }, + synology: { icon: faServer, color: "#007AFF", label: "Synology" }, + }; + const info = iconMap[provider]; + if (!info) return null; + return ( + + + + ); + })()} {/* Subtask indicator */} {task.subTasks && task.subTasks.length > 0 && (() => { const completed = task.subTasks.filter(s => s.completed).length; diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 075c7a4..f9f34c2 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -4731,7 +4731,7 @@ export default function WeeklyView() { {/* Date Picker Toggle */} -
+