refactor: simplify update overlay UI and replace loading icon with logo

This commit is contained in:
Bohdan Triapitsyn
2025-12-26 02:34:24 +02:00
parent 96fd94fa7b
commit 77d841cb62
@@ -3,7 +3,7 @@ import {
getConfigUpdateSnapshot, getConfigUpdateSnapshot,
subscribeConfigUpdate, subscribeConfigUpdate,
} from "@/lib/configUpdate"; } from "@/lib/configUpdate";
import { RiRestartLine } from '@remixicon/react'; import { OpenChamberLogo } from "./OpenChamberLogo";
export const ConfigUpdateOverlay: React.FC = () => { export const ConfigUpdateOverlay: React.FC = () => {
const [{ isUpdating, message }, setState] = React.useState(() => getConfigUpdateSnapshot()); const [{ isUpdating, message }, setState] = React.useState(() => getConfigUpdateSnapshot());
@@ -17,22 +17,11 @@ export const ConfigUpdateOverlay: React.FC = () => {
} }
return ( return (
<div className="fixed inset-0 z-[9999] flex items-center justify-center bg-background/80 backdrop-blur-md"> <div className="fixed inset-0 z-[9999] flex flex-col items-center justify-center gap-6 backdrop-blur-md">
<div className="w-full max-w-sm rounded-xl border border-border/40 bg-card/90 px-6 py-8 text-center shadow-none"> <OpenChamberLogo width={80} height={80} isAnimated />
<div className="flex flex-col items-center gap-4"> <p className="typography-body text-muted-foreground">
<div className="flex h-14 w-14 items-center justify-center rounded-full border-2 border-primary/30 border-t-transparent text-primary"> {message}
<RiRestartLine className="h-7 w-7 animate-spin" /> </p>
</div>
<div className="space-y-2">
<h2 className="typography-h3 font-semibold text-foreground">
Updating OpenCode
</h2>
<p className="typography-body text-muted-foreground">
{message}
</p>
</div>
</div>
</div>
</div> </div>
); );
}; };