From a26dc5efa6e35e8b4ea5f39b610d99ca2b64d3fa Mon Sep 17 00:00:00 2001 From: mARTin Date: Wed, 18 Mar 2026 17:23:18 +0100 Subject: [PATCH] feat: view style tabs at top of settings as per-view context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move view style selector (Simple/Calendar/List/Kanban) to the top of the general settings tab. Settings below now automatically apply to the selected view. Replaces the previous per-view badge approach with a cleaner tab-based UI: switch to a view tab, adjust its settings — done. Per-view settings: hour format, sub-hour labels, weather, checkboxes. v1.50.0 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/components/WeeklyView.tsx | 153 ++++++++-------------------------- 2 files changed, 36 insertions(+), 119 deletions(-) diff --git a/package.json b/package.json index 2cbb9c6..249fbdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.49.1", + "version": "1.50.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/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 7a0cdeb..fb5a8eb 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -8514,10 +8514,7 @@ export default function WeeklyView() { onEndHourChange: (h: number) => { setEndHour(h); saveSetting("endHour", h); }, }} perView={{ - isPerView: isPerView as any, - togglePerView: togglePerView as any, saveViewSetting: saveViewSetting as any, - viewLabel: viewStyle === "simple" ? (language === "de" ? "Einfach" : "Simple") : viewStyle === "calendar" ? (language === "de" ? "Kalender" : "Calendar") : viewStyle === "list" ? (language === "de" ? "Liste" : "List") : "Kanban", }} /> ) @@ -10055,10 +10052,7 @@ interface SettingsSidebarProps { onEndHourChange: (h: number) => void; }; perView: { - isPerView: (key: string) => boolean; - togglePerView: (key: string, globalVal: any) => void; saveViewSetting: (key: string, value: any, perView: boolean) => void; - viewLabel: string; }; } // Notes Sidebar Component @@ -10286,31 +10280,6 @@ function SettingsSidebar({ mobileActions, perView, }: SettingsSidebarProps) { - // Per-view badge: shows which view a setting applies to, click to toggle - const PerViewBadge = ({ settingKey, globalVal }: { settingKey: string; globalVal: any }) => { - const isPV = perView.isPerView(settingKey); - return ( - - ); - }; - const [activeTab, setActiveTab] = useState< "calendar" | "general" | "account" | "styling" | "motivation" | "about" | "localisation" >(initialTab || "general"); @@ -10837,6 +10806,33 @@ function SettingsSidebar({
+ {/* View Style Tabs — at top, acts as context for per-view settings */} +
+ +
+ + + + +
+

+ {profile.language === "de" ? "Einstellungen unten gelten für diese Ansicht" : "Settings below apply to this view"} +

+
{ setProfile({ ...profile, showTaskCheckboxes: e.target.checked }); - if (perView.isPerView("showTaskCheckboxes")) { - perView.saveViewSetting("showTaskCheckboxes", e.target.checked, true); - } + perView.saveViewSetting("showTaskCheckboxes", e.target.checked, true); }} style={{ width: "16px", height: "16px" }} />