fix: sidebar toggles now correctly update per-view settings

Someday, All-day, Checkboxes, Project-Icons, and Weather toggles in the
left quick-settings panel were calling saveSetting() (global profile PATCH)
instead of saveViewSetting(..., true) (per-view override).

getEffective() checks the per-view override first, so whenever a per-view
setting existed (set via the settings modal) the global update was silently
ignored and the toggle appeared broken.

All five toggles now call saveViewSetting(key, !value, true) which updates
viewSettings[currentView][key] directly — matching exactly what the settings
modal's view-tab checkboxes do.

v1.83.1
This commit is contained in:
mARTin 2026-04-05 12:14:52 +02:00
parent a6a1a68c73
commit 55c21ff6a6
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "my-weekly-todo-list",
"version": "1.83.0",
"version": "1.83.1",
"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": {

View File

@ -5547,32 +5547,32 @@ export default function WeeklyView() {
{/* Toggle switches */}
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{profile.language === "de" ? "Irgendwann" : "Someday"}</span>
<button onClick={() => { const v = !effectiveShowSomeday; setShowSomeday(v); saveSetting("showSomeday", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
<button onClick={() => saveViewSetting("showSomeday", !effectiveShowSomeday, true)} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
{effectiveShowSomeday ? <Eye size={16} /> : <EyeOff size={16} />}
</button>
</div>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{profile.language === "de" ? "Ganztägig" : "All-day"}</span>
<button onClick={() => { const v = !effectiveShowAllDay; setShowAllDay(v); saveSetting("showAllDayEvents", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
<button onClick={() => saveViewSetting("showAllDayEvents", !effectiveShowAllDay, true)} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
{effectiveShowAllDay ? <Eye size={16} /> : <EyeOff size={16} />}
</button>
</div>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{profile.language === "de" ? "Checkboxen" : "Checkboxes"}</span>
<button onClick={() => { const v = !effectiveShowTaskCheckboxes; saveSetting("showTaskCheckboxes", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
<button onClick={() => saveViewSetting("showTaskCheckboxes", !effectiveShowTaskCheckboxes, true)} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
{effectiveShowTaskCheckboxes ? <Eye size={16} /> : <EyeOff size={16} />}
</button>
</div>
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{profile.language === "de" ? "Projekt-Icons" : "Project Icons"}</span>
<button onClick={() => { const v = !effectiveShowProjectIcons; saveSetting("showProjectIcons", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
<button onClick={() => saveViewSetting("showProjectIcons", !effectiveShowProjectIcons, true)} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
{effectiveShowProjectIcons ? <Eye size={16} /> : <EyeOff size={16} />}
</button>
</div>
{(profile.weatherLat || profile.weatherLon) && (
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{profile.language === "de" ? "Wetter" : "Weather"}</span>
<button onClick={() => { const v = !effectiveWeatherEnabled; saveSetting("weatherEnabled", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
<button onClick={() => saveViewSetting("weatherEnabled", !effectiveWeatherEnabled, true)} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
{effectiveWeatherEnabled ? <Eye size={16} /> : <EyeOff size={16} />}
</button>
</div>