@@ -5,25 +5,37 @@ import { NeuronWalletContext } from 'states/stateProvider'
55import { StateWithDispatch } from 'states/stateProvider/reducer'
66import { addPopup } from 'states/stateProvider/actionCreators'
77import { checkForUpdates , downloadUpdate , installUpdate , clearCellCache } from 'services/remote'
8+ import { releaseNotesStyle } from './style.module.scss'
89
910const UpdateDownloadStatus = ( {
1011 progress = 0 ,
1112 newVersion = '' ,
12- } : React . PropsWithoutRef < { progress : number ; newVersion : string } > ) => {
13+ releaseNotes = '' ,
14+ } : React . PropsWithoutRef < { progress : number ; newVersion : string ; releaseNotes : string } > ) => {
1315 const [ t ] = useTranslation ( )
14- const available = newVersion !== '' && progress <= 0
16+ const available = newVersion !== '' && progress < 0
1517 const downloaded = progress >= 1
1618
1719 if ( available ) {
1820 const download = ( ) => {
1921 downloadUpdate ( )
2022 }
2123
24+ const releaseNotesHtml = ( ) => {
25+ return { __html : releaseNotes }
26+ }
27+
28+ /* eslint-disable react/no-danger */
29+
2230 return (
2331 < Stack >
2432 < Text as = "p" variant = "medium" >
2533 { t ( 'updates.updates-found-do-you-want-to-update' , { version : newVersion } ) }
2634 </ Text >
35+ < h3 > { t ( 'updates.release-notes' ) } </ h3 >
36+ < div className = { releaseNotesStyle } >
37+ < div dangerouslySetInnerHTML = { releaseNotesHtml ( ) } />
38+ </ div >
2739 < Stack horizontal horizontalAlign = "start" >
2840 < PrimaryButton
2941 onClick = { download }
@@ -101,7 +113,11 @@ const GeneralSetting = ({ dispatch }: React.PropsWithoutRef<StateWithDispatch>)
101113 < Stack >
102114 < Stack horizontal horizontalAlign = "start" >
103115 { updater . version !== '' || updater . downloadProgress >= 0 ? (
104- < UpdateDownloadStatus progress = { updater . downloadProgress } newVersion = { updater . version } />
116+ < UpdateDownloadStatus
117+ progress = { updater . downloadProgress }
118+ newVersion = { updater . version }
119+ releaseNotes = { updater . releaseNotes }
120+ />
105121 ) : (
106122 < PrimaryButton
107123 onClick = { checkUpdates }
0 commit comments