From ee67bf1e291abfd655d8699b59d201858e250284 Mon Sep 17 00:00:00 2001 From: Stijnus <72551117+Stijnus@users.noreply.github.com> Date: Sun, 2 Feb 2025 16:55:12 +0100 Subject: [PATCH] Update UpdateTab.tsx --- .../@settings/tabs/update/UpdateTab.tsx | 175 +++++++++++++++--- 1 file changed, 147 insertions(+), 28 deletions(-) diff --git a/app/components/@settings/tabs/update/UpdateTab.tsx b/app/components/@settings/tabs/update/UpdateTab.tsx index c1aba2e0..45fdddb6 100644 --- a/app/components/@settings/tabs/update/UpdateTab.tsx +++ b/app/components/@settings/tabs/update/UpdateTab.tsx @@ -4,6 +4,7 @@ import { useSettings } from '~/lib/hooks/useSettings'; import { logStore } from '~/lib/stores/logs'; import { toast } from 'react-toastify'; import { Dialog, DialogRoot, DialogTitle, DialogDescription, DialogButton } from '~/components/ui/Dialog'; +import { classNames } from '~/utils/classNames'; interface UpdateProgress { stage: 'fetch' | 'pull' | 'install' | 'build' | 'complete'; @@ -80,7 +81,7 @@ const UpdateTab = () => { const { isLatestBranch } = useSettings(); const [isChecking, setIsChecking] = useState(false); const [error, setError] = useState(null); - const [updateSettings] = useState(() => { + const [updateSettings, setUpdateSettings] = useState(() => { const stored = localStorage.getItem('update_settings'); return stored ? JSON.parse(stored) @@ -176,36 +177,154 @@ const UpdateTab = () => { }; return ( -
-
-

Updates

- -
+ +
- {/* Show progress information */} - {updateProgress && } +
+
+ In-App Notifications +

Show notifications when updates are available

+
+ +
- {error &&
{error}
} +
+
+ Check Interval +

How often to check for updates

+
+ +
+ + + + {/* Update Status Card */} + +
+
+
+

Update Status

+
+ +
+ + {/* Show progress information */} + {updateProgress && } + + {error &&
{error}
} + {/* Update dialog */}