1
+ import { remote } from 'electron' ;
1
2
import * as React from 'react' ;
2
3
import { connect } from 'react-redux' ;
3
4
4
5
import { Button , Modal , Progress } from 'antd' ;
5
6
6
- import { updateApp } from '../actions/update' ;
7
+ import { quitAndInstall } from '../actions/update' ;
7
8
8
9
import I18n from '../../../lib/i18n/I18n' ;
9
10
const i18n : I18n = new I18n ( ) ;
@@ -14,14 +15,14 @@ const mapStateToProps = state => ({
14
15
15
16
const mapDispatchToProps = dispatch => {
16
17
return {
17
- updateApp : ( ) => dispatch ( updateApp ( ) ) ,
18
+ quitAndInstall : ( ) => dispatch ( quitAndInstall ( ) ) ,
18
19
} ;
19
20
} ;
20
21
21
22
@connect ( mapStateToProps , mapDispatchToProps )
22
23
class DownloadModal extends React . Component < any , any > {
23
24
handleExit = ( ) => {
24
- this . props . updateApp ( ) ;
25
+ this . props . quitAndInstall ( ) ;
25
26
} ;
26
27
27
28
render ( ) {
@@ -34,8 +35,7 @@ class DownloadModal extends React.Component<any, any> {
34
35
footer = { [
35
36
< Button
36
37
disabled = {
37
- this . props . update . downloading ||
38
- this . props . update . downloadPercentage !== 100
38
+ this . props . update . downloading || this . props . update . downloadPercentage != 100
39
39
}
40
40
key = "enter"
41
41
onClick = { this . handleExit }
0 commit comments