- Add global updateCheckEnabled setting to core schema/types and wire dashboard command to cache update checks in the CLI - Implement dashboard server update-check cache module plus REST routes for status and refresh behavior - Add dashboard client hook, legacy API helpers, and UpdateAvailableBanner UI to show cached CLI update notices - Cover update-check server routes, hook behavior, banner rendering, and route registration with focused tests - Document update-check configuration and API behavior in architecture and settings reference docs
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import "./UpdateAvailableBanner.css";
|
|
import { X } from "lucide-react";
|
|
|
|
interface UpdateAvailableBannerProps {
|
|
latestVersion: string;
|
|
currentVersion: string;
|
|
onDismiss: () => void;
|
|
}
|
|
|
|
export function UpdateAvailableBanner({ latestVersion, currentVersion, onDismiss }: UpdateAvailableBannerProps) {
|
|
return (
|
|
<div className="update-available-banner" role="status" aria-live="polite">
|
|
<p className="update-available-banner__text">
|
|
Update available: v{latestVersion} (current: v{currentVersion}). Run <code>npm i -g @runfusion/fusion</code> to
|
|
update. {" "}
|
|
<a
|
|
className="update-available-banner__link"
|
|
href="https://github.com/Runfusion/Fusion/releases"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
Release notes
|
|
</a>
|
|
</p>
|
|
<button
|
|
type="button"
|
|
className="update-available-banner__dismiss touch-target"
|
|
aria-label="Dismiss update notice"
|
|
onClick={onDismiss}
|
|
>
|
|
<X size={16} aria-hidden="true" />
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|