Multiple minor changes and improvements

This commit is contained in:
2026-10-08 21:14:54 +02:00
parent 163424f6f1
commit 5cf19bb8ac
30 changed files with 500 additions and 174 deletions

View File

@@ -6,14 +6,14 @@
* worker should land on.
*/
const ROUTES = ['resume', 'today', 'settings', 'stats'];
const ROUTES = ['resume', 'today', 'settings', 'stats', 'details', 'automations', 'non-working'];
function fromHash() {
const h = location.hash.replace(/^#\/?/, '');
return ROUTES.includes(h) ? h : null;
}
export const router = $state({ route: fromHash() });
export const router = $state({ route: fromHash(), selectedDate: '' });
window.addEventListener('hashchange', () => {
router.route = fromHash();