Remove UpdateNotification component and its usage in App.tsx

- Deleted the UpdateNotification component to streamline the application.
- Removed its invocation from the App component, enhancing the overall code clarity.
- Updated Assets.car file to reflect changes in the application structure.
This commit is contained in:
Jamie Pine
2026-01-26 17:23:18 -08:00
parent 48acc10422
commit 7c4b1d4dd2
3 changed files with 0 additions and 72 deletions
-3
View File
@@ -10,7 +10,6 @@ import { UpdateStatus } from '@/components/ServerSettings/UpdateStatus';
import ShinyText from '@/components/ShinyText';
import { Sidebar } from '@/components/Sidebar';
import { TitleBarDragRegion } from '@/components/TitleBarDragRegion';
import { UpdateNotification } from '@/components/UpdateNotification';
import { Toaster } from '@/components/ui/toaster';
import { ProfileList } from '@/components/VoiceProfiles/ProfileList';
import { useModelDownloadToast } from '@/lib/hooks/useModelDownloadToast';
@@ -175,8 +174,6 @@ function App() {
<main className="flex-1 ml-20 overflow-hidden flex flex-col">
<div className="container mx-auto px-8 max-w-[1800px] h-full overflow-hidden flex flex-col">
<UpdateNotification />
{activeTab === 'settings' ? (
<div className="space-y-4 overflow-y-auto flex flex-col">
<div className="grid gap-4 md:grid-cols-2">
-69
View File
@@ -1,69 +0,0 @@
import { useAutoUpdater } from '../hooks/useAutoUpdater';
import { Button } from './ui/button';
import { Card } from './ui/card';
import { Progress } from './ui/progress';
export function UpdateNotification() {
const { status, checkForUpdates, downloadAndInstall } = useAutoUpdater(true);
if (status.error) {
return null;
}
if (!status.available && !status.checking) {
return null;
}
if (status.checking) {
return (
<Card className="p-4 mb-4">
<div className="flex items-center gap-3">
<div className="animate-spin h-4 w-4 border-2 border-primary border-t-transparent rounded-full" />
<span className="text-sm">Checking for updates...</span>
</div>
</Card>
);
}
if (status.available) {
return (
<Card className="p-4 mb-4 border-primary">
<div className="space-y-3">
<div>
<h3 className="font-semibold">Update Available</h3>
<p className="text-sm text-muted-foreground">
Version {status.version} is ready to install
</p>
</div>
{status.downloading && (
<div className="space-y-2">
<p className="text-sm">Downloading update...</p>
<Progress />
</div>
)}
{status.installing && (
<div className="space-y-2">
<p className="text-sm">Installing update...</p>
<p className="text-xs text-muted-foreground">App will restart automatically</p>
</div>
)}
{!status.downloading && !status.installing && (
<div className="flex gap-2">
<Button onClick={downloadAndInstall} size="sm">
Install Now
</Button>
<Button onClick={() => window.location.reload()} variant="outline" size="sm">
Later
</Button>
</div>
)}
</div>
</Card>
);
}
return null;
}
Binary file not shown.