"use client"; import { useUpdateReminder } from "@/modules/system/hooks/useUpdateReminder"; const DOCKER_UPDATE_COMMAND = "docker compose pull && docker compose up -d"; type UpdateReminderBarProps = { currentVersion: string | null; latestVersion: string; canSelfUpdate: boolean; isApplying: boolean; error: string | null; onLater: () => void; onDetails: () => void; onUpdate: () => void; }; /** Floating bar above the dock, in the same style as the uninstall confirmation. */ export function UpdateReminderBar({ currentVersion, latestVersion, canSelfUpdate, isApplying, error, onLater, onDetails, onUpdate, }: UpdateReminderBarProps) { return (
{/* On a phone the buttons wrap under the text instead of squeezing it. */}

Homeio {latestVersion} is available

{currentVersion ? (

You have {currentVersion}

) : null}
{canSelfUpdate ? ( ) : null}
{!canSelfUpdate ? (
Running in Docker: update from the folder with your compose file with{" "} {DOCKER_UPDATE_COMMAND}
) : null} {error ? (

{error}

) : null}
); } type UpdateReminderProps = { /** False while the desktop is locked or in demo mode. */ enabled: boolean; onOpenDetails: () => void; }; export function UpdateReminder({ enabled, onOpenDetails }: UpdateReminderProps) { const reminder = useUpdateReminder({ enabled }); if (!reminder.visible || !reminder.latestVersion) return null; return ( { // Settings → Updates has its own Update button; the bar would only cover it. reminder.later(); onOpenDetails(); }} onUpdate={() => void reminder.update()} /> ); }