Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
can't overlay on browserview yet, so just redirect to homepage for up…
Browse files Browse the repository at this point in the history
…date prompt
  • Loading branch information
Hunter Miller committed May 7, 2021
1 parent 0ba7aa9 commit 240269a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 10 additions & 1 deletion src/renderer/shared/UpdateNotifier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down Expand Up @@ -49,7 +58,7 @@ export const UpdateNotifier = () => {
{status === 'downloaded' &&
<>
<Popover.Root defaultOpen={true}>
<Popover.Trigger className="hover:text-black dark:hover:text-white default-ring">
<Popover.Trigger className="hover:text-black dark:hover:text-white default-ring" onClick={onClick}>
Updates Ready
</Popover.Trigger>
<PopoverContent
Expand Down

0 comments on commit 240269a

Please sign in to comment.