-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc7eb8b
commit 9d07d0b
Showing
11 changed files
with
393 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Dialog, PrimaryButton } from '@chainx/ui' | ||
import styled from 'styled-components' | ||
import React from 'react' | ||
import { useSelector } from 'react-redux' | ||
import { updateInfoSelector } from '../store/reducers/statusSlice' | ||
|
||
const StyledDialog = styled(Dialog)` | ||
.MuiDialog-paper { | ||
min-width: unset !important; | ||
} | ||
.makeStyles-header-1 { | ||
justify-content: space-around; | ||
} | ||
.makeStyles-title-2 { | ||
font-weight: 600; | ||
} | ||
.makeStyles-closeButton-3 { | ||
display: none; | ||
} | ||
.MuiDialog-paper { | ||
position: relative; | ||
left: 30px; | ||
} | ||
width: 300px; | ||
div.wrapper { | ||
padding: 0 10px 10px; | ||
p { | ||
text-align: center; | ||
font-size: 14px; | ||
margin-top: 8px; | ||
} | ||
} | ||
` | ||
|
||
export default function() { | ||
const { versionInfo } = useSelector(updateInfoSelector) | ||
if (!versionInfo) { | ||
throw new Error('No update info available') | ||
} | ||
|
||
return ( | ||
<StyledDialog title="New Version" open> | ||
<div className="wrapper"> | ||
<p> | ||
Please update ChainX signer to <b>{versionInfo.version}</b> | ||
</p> | ||
<PrimaryButton | ||
size="fullWidth" | ||
onClick={() => { | ||
window.openExternal(versionInfo.path) | ||
}} | ||
> | ||
download | ||
</PrimaryButton> | ||
</div> | ||
</StyledDialog> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.