summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1b63569)
Using opacity to darken tags isn't great: It grays the text too much.
But it's a lot simpler than making the tag color depend on dark-mode
state, which would require touching every tag during dark-mode switch,
which would require locking to ensure that a dark-mode switch completes
before another one is started, because tag color calculations are done
asynchronously because crypto's interface forces this. :(
margin-left: 1em;
font-size: 80%;
}
margin-left: 1em;
font-size: 80%;
}
+body.dark .tag {
+ opacity: 60%;
+}
span.tag {
color: white;
padding: 1px .5em;
span.tag {
color: white;
padding: 1px .5em;
color: #555;
white-space: pre;
}
color: #555;
white-space: pre;
}
+body.dark .content, body.dark textarea {
+ color: #bbb;
+}
textarea {
width: 90%;
height: 5em;
}
textarea {
width: 90%;
height: 5em;
}
+body.dark textarea {
+ background-color: black;
+}
padding: 0 .2em;
border-radius: 1em;
}
padding: 0 .2em;
border-radius: 1em;
}
+body.dark .statedate { opacity: 60%; }
.task[data-state=cancelled] > .statedate { background-color: #fee; }
.task[data-state=deleted] > .statedate { background-color: #ddd; }
.task[data-state=done] > .statedate { background-color: #efe; }
.task[data-state=someday-maybe] > .statedate { background-color: #eef; }
.task[data-state=waiting] > .statedate { background-color: #faf; }
.task[data-state=cancelled] > .statedate { background-color: #fee; }
.task[data-state=deleted] > .statedate { background-color: #ddd; }
.task[data-state=done] > .statedate { background-color: #efe; }
.task[data-state=someday-maybe] > .statedate { background-color: #eef; }
.task[data-state=waiting] > .statedate { background-color: #faf; }
+body.dark .task[data-state=cancelled] > .statedate { background-color: #600; }
+body.dark .task[data-state=deleted] > .statedate { background-color: #222; }
+body.dark .task[data-state=done] > .statedate { background-color: #060; }
+body.dark .task[data-state=someday-maybe] > .statedate { background-color: #006; }
+body.dark .task[data-state=waiting] > .statedate { background-color: #303; }
#ui {
padding: 15px 10px;
}
#ui {
padding: 15px 10px;
}
border-left: 5px solid var(--view-state-indicator-color);
border-right: 5px solid var(--view-state-indicator-color);
}
border-left: 5px solid var(--view-state-indicator-color);
border-right: 5px solid var(--view-state-indicator-color);
}
+body.dark, body.dark input {
+ color: #eee;
+ background-color: black;
+}
deleted: "Black",
done: "LawnGreen",
"someday-maybe": "DeepSkyBlue",
deleted: "Black",
done: "LawnGreen",
"someday-maybe": "DeepSkyBlue",
+ todo: "rgb(0 0 0 / 0)",
waiting: "MediumOrchid",
};
var currentTagFilter: TagFilter | null = null;
waiting: "MediumOrchid",
};
var currentTagFilter: TagFilter | null = null;
this.setTagFilter({description: "(untagged)", include: task => task.getElementsByClassName("tag").length === 0});
},
this.setTagFilter({description: "(untagged)", include: task => task.getElementsByClassName("tag").length === 0});
},
+ toggleDark: function () {
+ document.body.classList.toggle("dark");
+ this.setView(currentViewState);
+ },
+
undo: function () {
const ret = ui.undo();
if (ret && ret instanceof HTMLElement) ret.focus();
undo: function () {
const ret = ui.undo();
if (ret && ret instanceof HTMLElement) ret.focus();
if (event.key == "a") return browserUI.setView("all");
if (event.key == "C") return browserUI.setView("cancelled");
if (event.key == "c") return browserUI.setTagView("comp");
if (event.key == "a") return browserUI.setView("all");
if (event.key == "C") return browserUI.setView("cancelled");
if (event.key == "c") return browserUI.setTagView("comp");
+ if (event.key == "D") return browserUI.toggleDark();
if (event.key == "d") return browserUI.setView("done");
if (event.key == "e") return browserUI.setTagView("errand");
if (event.key == "h") return browserUI.setTagView("home");
if (event.key == "d") return browserUI.setView("done");
if (event.key == "e") return browserUI.setTagView("errand");
if (event.key == "h") return browserUI.setTagView("home");