fix: sync showProjectIcons and showTaskCheckboxes between settings panel and quick toggle
Both settings were stored as per-view overrides by the full settings panel but the quick sidebar toggles read/wrote the global profile value. The per-view override took precedence in getEffective(), so global changes from the quick toggle were silently ignored. - Settings panel now calls saveField() (global profile) for these two settings instead of saveViewSetting() (per-view override) - On change, also clears any stale per-view overrides via saveViewSetting(key, value, false) so the global value always wins - Quick sidebar eye icons now reflect effectiveShowTaskCheckboxes / effectiveShowProjectIcons instead of the raw profile values v1.76.1
This commit is contained in:
parent
620118e6d5
commit
ba17025bb9
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.76.0",
|
||||
"version": "1.76.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": {
|
||||
|
||||
@ -6604,13 +6604,13 @@ export default function WeeklyView() {
|
||||
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
|
||||
<span style={{ fontSize: "0.75rem", fontWeight: 600, color: darkMode ? "#9ca3af" : "#6b7280" }}>{language === "de" ? "Checkboxen" : "Checkboxes"}</span>
|
||||
<button onClick={() => { const v = !profile.showTaskCheckboxes; setProfile({ ...profile, showTaskCheckboxes: v }); saveSetting("showTaskCheckboxes", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
|
||||
{profile.showTaskCheckboxes ? <Eye size={16} /> : <EyeOff size={16} />}
|
||||
{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" }}>{language === "de" ? "Projekt-Icons" : "Project Icons"}</span>
|
||||
<button onClick={() => { const v = !profile.showProjectIcons; setProfile({ ...profile, showProjectIcons: v }); saveSetting("showProjectIcons", v); }} style={{ background: "none", border: "none", cursor: "pointer", padding: "2px", color: darkMode ? "#9ca3af" : "#6b7280" }}>
|
||||
{profile.showProjectIcons ? <Eye size={16} /> : <EyeOff size={16} />}
|
||||
{effectiveShowProjectIcons ? <Eye size={16} /> : <EyeOff size={16} />}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -12768,9 +12768,10 @@ function SettingsSidebar({
|
||||
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
|
||||
<input type="checkbox" id="showTaskCheckboxes"
|
||||
checked={perView.getEffective("showTaskCheckboxes", profile.showTaskCheckboxes) as boolean}
|
||||
checked={profile.showTaskCheckboxes || false}
|
||||
onChange={(e) => {
|
||||
perView.saveViewSetting("showTaskCheckboxes", e.target.checked, true);
|
||||
saveField("showTaskCheckboxes", e.target.checked);
|
||||
perView.saveViewSetting("showTaskCheckboxes", e.target.checked, false);
|
||||
}}
|
||||
style={{ width: "16px", height: "16px" }} />
|
||||
<label htmlFor="showTaskCheckboxes" style={{ fontSize: "0.9rem", fontWeight: 600 }}>{t.showTaskCheckboxes}</label>
|
||||
@ -12778,9 +12779,10 @@ function SettingsSidebar({
|
||||
|
||||
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
|
||||
<input type="checkbox" id="showProjectIcons"
|
||||
checked={perView.getEffective("showProjectIcons", profile.showProjectIcons) as boolean}
|
||||
checked={profile.showProjectIcons || false}
|
||||
onChange={(e) => {
|
||||
perView.saveViewSetting("showProjectIcons", e.target.checked, true);
|
||||
saveField("showProjectIcons", e.target.checked);
|
||||
perView.saveViewSetting("showProjectIcons", e.target.checked, false);
|
||||
}}
|
||||
style={{ width: "16px", height: "16px" }} />
|
||||
<label htmlFor="showProjectIcons" style={{ fontSize: "0.9rem", fontWeight: 600 }}>{t.showProjectIcons}</label>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user