From 59be6b6ecf429d381de60fec9f6fc056b40c5055 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Thu, 5 Nov 2026 17:41:35 -0600 Subject: [PATCH] Redesign calendar screen --- frontend/src/routes/CalendarPage.svelte | 185 ++++++++++++++++-------- 1 file changed, 122 insertions(+), 63 deletions(-) diff --git a/frontend/src/routes/CalendarPage.svelte b/frontend/src/routes/CalendarPage.svelte index 91f8504..9043ff8 100644 --- a/frontend/src/routes/CalendarPage.svelte +++ b/frontend/src/routes/CalendarPage.svelte @@ -1,7 +1,21 @@ -

Calendar

+ {#if !calendars.length} -

Add a calendar in Settings first.

+ +

A calendar is what you download into Apple or Google Calendar: one per child, or one for the family.

+ Add a calendar +
{:else} -
- - -
- -
- - {monthLabel(month)} - -
- -
-
- Download new and changed (.ics) - Download everything +
+
+ +
-

- On iPhone, open the file and tap “Add All”. Each download holds what changed since the last one, so re-importing - doesn't duplicate events in Apple Calendar. - {#if calendar?.last_exported_at}Last download: {new Date(calendar.last_exported_at.replace(' ', 'T') + 'Z').toLocaleString()}.{/if} -

-
-
- -
- {#if editing === 'new'} -
- (editing = null)} /> +
+
+ +
+

Add to your phone's calendar

+

On iPhone, open the file and tap “Add All”. Each download holds only what changed since the last one, so nothing is duplicated.

+
+
+ + {#if lastDownload}

Last download {lastDownload.toLocaleString(undefined, { dateStyle: 'medium', timeStyle: 'short' })}

{/if} +
+ +
+ +

{monthLabel(month)}

+ + +
- {/if} - {#if error} -

{error}

- {:else if events === null} -

Loading…

- {:else if view === 'grid'} - - {:else if !events.length} -

Nothing this month.

- {:else} - {#each byDay as [day, list] (day)} -

{dayLabel(day)}

-
    - {#each list as e (e.id)} -
  • - - {#if editing === e.id} - (editing = null)} ondelete={remove(e.id)} /> - {/if} + {#if editing === 'new'} +
    +

    New event

    + (editing = null)} /> +
    + {/if} + + {#if error} + + {:else if events === null} +
    + {#each [1, 2, 3] as _}
    {/each} +
    + {:else if view === 'grid'} + + {:else if !events.length} + +

    Publish a scan, or add an event by hand.

    +
    + {:else} +
      + {#each byDay as [day, list] (day)} + {@const d = parse(day)} +
    1. + +
        + {#each list as e (e.id)} + {@const KindIcon = KIND_ICONS[e.kind]} +
      • + + {#if editing === e.id} + (editing = null)} ondelete={remove(e.id)} /> + {/if} +
      • + {/each} +
    2. {/each} -
- {/each} - {/if} + + {/if} +
{/if}