docs(readme,preview): screenshots of both tabs, a calendar scene on the busiest month
This commit is contained in:
1 parent
fa36710f0c
commit
b415b17007
4 files changed
+16
-3
No files matched your search
@@ -105,6 +105,17 @@ async function main(): Promise<void> {
|
||||
}
|
||||
if (scene === "rail-none") store.filterNone();
|
||||
}
|
||||
// The month grid on its own, opened on the month the fixtures are busiest in.
|
||||
if (scene === "cal") {
|
||||
const months = new Map<string, number>();
|
||||
for (const item of store.visible) {
|
||||
const key = (item.due ?? item.scheduled)?.slice(0, 7);
|
||||
if (key) months.set(key, (months.get(key) ?? 0) + 1);
|
||||
}
|
||||
const busiest = [...months.entries()].sort((a, b) => b[1] - a[1])[0]?.[0];
|
||||
store.view = "calendar";
|
||||
if (busiest) store.focusDay(`${busiest}-15`);
|
||||
}
|
||||
if (scene.startsWith("peek")) {
|
||||
if (scene === "peek-cal") store.view = "calendar";
|
||||
if (scene === "peek-notes") store.showDone = true;
|
||||
|
||||
Reference in new issue
Block a user