tasks: shared task board with sticker rewards, difficulty levels, and calendar

Complete household task management system behind task_users auth group:
- Task CRUD with recurring schedules, assignees, tags, and optional difficulty
- Blobcat SVG sticker rewards on completion, rarity weighted by difficulty
- Sticker collection page with calendar view and progress tracking
- Redesigned cards with left accent urgency strip, assignee PFP, round check button
- Weekday-based due date labels for tasks within 7 days
- Tasks link added to homepage LinksGrid
This commit is contained in:
2026-04-02 07:32:53 +02:00
parent c76c6e8cbe
commit 81c70df78e
69 changed files with 11158 additions and 1 deletions
+18
View File
@@ -56,6 +56,24 @@ async function authorization({ event, resolve }: Parameters<Handle>[0]) {
}
}
// Protect tasks routes and API endpoints
if (event.url.pathname.startsWith('/tasks') || event.url.pathname.startsWith('/api/tasks')) {
if (!session) {
if (event.url.pathname.startsWith('/api/tasks')) {
error(401, {
message: 'Anmeldung erforderlich.'
});
}
const callbackUrl = encodeURIComponent(event.url.pathname + event.url.search);
redirect(303, `/login?callbackUrl=${callbackUrl}`);
}
else if (!session.user?.groups?.includes('task_users')) {
error(403, {
message: 'Zugriff verweigert. Du hast keine Berechtigung für diesen Bereich. Falls du glaubst, dass dies ein Fehler ist, wende dich bitte an Alexander.'
});
}
}
// Protect fitness routes and API endpoints
if (event.url.pathname.startsWith('/fitness') || event.url.pathname.startsWith('/api/fitness')) {
if (!session) {