From 2586e3ce3420ab9f72d5f10409c6f58ae19d12b0 Mon Sep 17 00:00:00 2001 From: mARTin Date: Tue, 31 Mar 2026 10:12:58 +0200 Subject: [PATCH] fix: list view time grid on mobile + legacy FA icon prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mobile quick settings view switcher now correctly toggles showTimeGrid when switching views (list → off, simple/calendar → on), matching the desktop switcher behaviour. This removes the unwanted time column in list view on mobile. - ProjectIcon: normalise legacy icon names stored as "faHeart" / "faHouse" (camelCase with "fa" prefix) to "heart" / "house" so the FA icon lookup succeeds instead of falling through to the text fallback. v1.81.3 --- package.json | 2 +- src/components/WeeklyView.tsx | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7e974f2..10911aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.81.2", + "version": "1.81.3", "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/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index ee160b4..6c62afc 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -5410,7 +5410,7 @@ export default function WeeklyView() { { key: "list", icon: }, { key: "kanban", icon: }, ].map((v) => ( - @@ -10077,8 +10077,12 @@ const projectIconsGlobal: { name: string; icon: IconDefinition }[] = [ // Helper to render a project icon (FA name, MDI name, or legacy emoji) function ProjectIcon({ icon, size = 18, color }: { icon?: string | null; size?: number; color?: string }) { if (!icon) return ; + // Normalise legacy "faHeart" → "heart" prefix style + const normalised = icon.startsWith("fa") && icon.length > 2 && icon[2] === icon[2].toUpperCase() + ? icon.slice(2, 3).toLowerCase() + icon.slice(3) + : icon; // Check unified icon registry (FA + MDI) - const found = allIcons.find((i) => i.name === icon); + const found = allIcons.find((i) => i.name === normalised || i.name === icon); if (found) { if (found.type === "fa") { return ; @@ -10086,7 +10090,7 @@ function ProjectIcon({ icon, size = 18, color }: { icon?: string | null; size?: return ; } // Legacy: check old projectIconsGlobal for backwards compat - const legacy = projectIconsGlobal.find((i) => i.name === icon); + const legacy = projectIconsGlobal.find((i) => i.name === normalised || i.name === icon); if (legacy) return ; // Legacy emoji fallback return {icon};