feat(tauri): proactive update notifications via toast (P5-40)
TauriUpdateFeature component in ClientNonUIFeatures checks for updates on mount and every 12h (skips if checked within the window). On update available, fires a Lotus toast: "Lotus Chat vX.Y.Z is ready to install." Clicking the toast calls install(). No-op on web (isTauri guard). Also adds optional onClick to ToastNotif type and wires it in LotusToastContainer so custom click handlers can skip hash navigation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -41,8 +41,12 @@ function ToastCard({ toast }: ToastCardProps) {
|
||||
}, [dismiss, toast.id]);
|
||||
|
||||
const handleCardClick = () => {
|
||||
// window.location.hash setter auto-prepends '#', so values must not include it
|
||||
window.location.hash = toast.hashPath ?? `/room/${toast.roomId}`;
|
||||
if (toast.onClick) {
|
||||
toast.onClick();
|
||||
} else {
|
||||
// window.location.hash setter auto-prepends '#', so values must not include it
|
||||
window.location.hash = toast.hashPath ?? `/room/${toast.roomId}`;
|
||||
}
|
||||
dismiss(toast.id);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user