From 240269a26a7c700104ab79cf373a0fc5e5988c1c Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Thu, 6 May 2021 22:56:02 -0500 Subject: [PATCH] can't overlay on browserview yet, so just redirect to homepage for update prompt --- package.json | 2 +- src/renderer/shared/UpdateNotifier.tsx | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bb9548d..1383473 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "taisho", "productName": "taisho", - "version": "0.5.5", + "version": "0.5.6", "description": "A ship runner and manager for Urbit OS", "repository": { "type": "git", diff --git a/src/renderer/shared/UpdateNotifier.tsx b/src/renderer/shared/UpdateNotifier.tsx index 08ced51..94c088c 100644 --- a/src/renderer/shared/UpdateNotifier.tsx +++ b/src/renderer/shared/UpdateNotifier.tsx @@ -6,16 +6,25 @@ import * as Popover from '@radix-ui/react-popover'; import { Close } from '../icons/Close'; import { Button } from './Button'; import { ipcRenderer } from 'electron'; +import { useHistory, useRouteMatch } from 'react-router'; const PopoverContent: any = Popover.Content; export const UpdateNotifier = () => { + const history = useHistory(); + const match = useRouteMatch('/pier/:slug/launch') const status = useStore(state => state.updateStatus); function install() { send('install-updates'); } + function onClick() { + if (match) { + history.push('/') + } + } + useEffect(() => { const listenAvailable = () => { useStore.setState({ updateStatus: 'available' }); @@ -49,7 +58,7 @@ export const UpdateNotifier = () => { {status === 'downloaded' && <> - + Updates Ready