-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump bugfix: update notice for v2 (#432)
Co-authored-by: Tejasv Sharma <tejasvonly@gmail.com>
- Loading branch information
1 parent
c4efa35
commit 4f5b66d
Showing
7 changed files
with
136 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { CircularProgress } from '@mui/material'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import { useState } from 'react'; | ||
import ReactPlayer from 'react-player'; | ||
|
||
export interface CustomPlayerProps { | ||
url: string; | ||
} | ||
|
||
export const CustomPlayer = ({ url }: CustomPlayerProps) => { | ||
const [isLoading, setIsLoading] = useState(true); | ||
|
||
const loadingComponent = () => { | ||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
paddingTop: '4rem' | ||
}} | ||
> | ||
<CircularProgress color="secondary" /> | ||
</div> | ||
); | ||
}; | ||
|
||
return ( | ||
<div style={{ width: '100%' }}> | ||
{isLoading && loadingComponent()} | ||
<ReactPlayer | ||
style={{ opacity: isLoading ? '0' : '1' }} | ||
width="100%" | ||
url={url} | ||
onReady={() => setIsLoading(false)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
CustomPlayer.propTypes = { | ||
url: PropTypes.string.isRequired | ||
}; |
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,11 @@ | ||
We have done a major overhaul to the cySync app. | ||
The new cySync comes with all your favorite features and much more. | ||
Download from: <https://cypherock.com/get-started> | ||
|
||
## Important | ||
|
||
- You won’t lose your funds | ||
- After update, you will have to import your accounts again | ||
- cySync v1 will not get new updates, just security updates will be given | ||
|
||
<i>Note - NEAR Protocol integration is currently under development and will arrive in a future update.</i> |
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
76 changes: 76 additions & 0 deletions
76
cysync/src/pages/mainApp/sidebar/portfolio/dialogs/UpdateNotice.tsx
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,76 @@ | ||
import content from '!!html-loader!markdown-loader!../../../../../constants/markdown/update-notice.md'; | ||
import BrowserUpdatedIcon from '@mui/icons-material/BrowserUpdated'; | ||
import { Alert, Button, Typography } from '@mui/material'; | ||
import React, { useState } from 'react'; | ||
|
||
import { CustomPlayer } from '../../../../../components/customPlayer'; | ||
import DialogBox from '../../../../../designSystem/designComponents/dialog/dialogBox'; | ||
import Markdown from '../../../../../designSystem/designComponents/textComponents/Markdown'; | ||
|
||
const alertText = 'cySync v2 is available!'; | ||
|
||
export const UpdateNotice: React.FC = () => { | ||
const [isDialogOpen, setIsDialogOpen] = useState(true); | ||
return ( | ||
<> | ||
<DialogBox | ||
open={isDialogOpen} | ||
handleClose={() => { | ||
setIsDialogOpen(false); | ||
}} | ||
fullWidth | ||
isClosePresent | ||
maxWidth="md" | ||
dialogHeading={alertText} | ||
restComponents={ | ||
<div | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
padding: '5rem' | ||
}} | ||
> | ||
<CustomPlayer | ||
url={ | ||
'https://www.youtube.com/embed/X7Kv4cGptcA?autoplay=1&loop=1' | ||
} | ||
/> | ||
<Markdown style={{ paddingBottom: '1rem', paddingTop: '1rem' }}> | ||
{content} | ||
</Markdown> | ||
</div> | ||
} | ||
/> | ||
{ | ||
<Alert | ||
action={ | ||
<Button | ||
style={{ padding: '0px', marginRight: '16px' }} | ||
onClick={() => { | ||
setIsDialogOpen(true); | ||
}} | ||
> | ||
<Typography | ||
sx={{ | ||
'&:hover': { | ||
textDecoration: 'underline' | ||
}, | ||
textTransform: 'none', | ||
color: '#5dab61' | ||
}} | ||
> | ||
Learn More | ||
</Typography> | ||
</Button> | ||
} | ||
severity="success" | ||
variant="outlined" | ||
iconMapping={{ success: <BrowserUpdatedIcon fontSize="inherit" /> }} | ||
sx={{ mb: 2 }} | ||
> | ||
{alertText} | ||
</Alert> | ||
} | ||
</> | ||
); | ||
}; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './DeprecationNotice'; | ||
export * from './UpdateNotice'; |
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