{ currentView = view; mobileMenuOpen = false; }} onToggle={() => mobileMenuOpen = !mobileMenuOpen} /> {#if mobileMenuOpen} {/if}

Calendink Provider 📅⚡✨🌈

ESP32-S3 System Dashboard v{__APP_VERSION__}

{#if status === "loading"}
Connecting...
{:else if status === "ok"}
Connected
{:else if status === "rebooting"}
Rebooting...
{:else}
Offline — {errorMsg}
{/if}
{#if currentView === 'dashboard'} {#if upcomingData.users.length > 0} {@const periodNames = ['Morning', 'Afternoon', 'Evening']} {@const periodIcons = ['🌅', '☀️', '🌙']}

📋 Today's Routine

{#each upcomingData.users as user} {@const routineTasks = user.tasks.filter(t => t.recurrence > 0)}

{user.name}

{#if routineTasks.length === 0}

No routine tasks

{:else} {#each [0, 1, 2] as periodIdx} {@const tasksForPeriod = routineTasks.filter(t => t.period & (1 << periodIdx))} {#if tasksForPeriod.length > 0}
{periodIcons[periodIdx]} {periodNames[periodIdx]}
{#each tasksForPeriod as task}
• {task.title} {#if task.recurrence > 0} {task.recurrence === 0x7F ? '∞' : task.recurrence === 0x1F ? 'wk' : ''} {:else if task.due_date > 0} {formatRelativeDate(task.due_date)} {/if}
{/each}
{/if} {/each} {/if}
{/each}
{/if}

System Info

{#each infoItems as item}
{item.icon} {item.label}
{#if status === "loading"} {:else} {item.value} {/if}
{/each}

Partition Table

Flash: 16MB
{#if status === "loading"}
Loading memory layout...
{:else} {#each otaStatus.partitions as part}
{part.label} {#if part.label === otaStatus.active_partition || part.label === otaStatus.running_firmware_label} Active {/if}
Type {part.type} / Sub {part.subtype}
{formatBytes(part.size)}
{#if part.app_version} v{part.app_version} {/if} {#if part.free !== undefined} {formatBytes(part.free)} free {/if}
{/each} {/if}

Device Control

Restart the ESP32 microcontroller

{ status = "rebooting"; isRecovering = true; }} />
{:else if currentView === 'tasks'}
{:else if currentView === 'users'}
{:else if currentView === 'devices'}
{/if} {#if showRebootConfirm}

Confirm Reboot

Are you sure you want to reboot the ESP32? The device will be temporarily unavailable.

{/if}