@@ -5,8 +5,7 @@ import AppWrapper from 'browser/components/AppWrapper'
5
5
import renderWhenReady from 'browser/helpers/renderWhenReady'
6
6
import React from 'react'
7
7
8
- const completeStatus =
9
- 'Update has been installed and will be applied on restart.'
8
+ const completeStatus = 'Update Downloaded'
10
9
11
10
let lastStatus = ''
12
11
// @ts -expect-error just whatever
@@ -22,36 +21,36 @@ const UpdateNotifier = () => {
22
21
setStatus ( lastStatus )
23
22
} , [ ] )
24
23
// @ts -expect-error this exists
25
- const completeUpdateNotifier = ( ) => window . completeUpdateNotifier ( )
26
- const closeUpdateNotifier = ( ) => window . close ( )
24
+ const doRestart = ( ) => window . doRestart ( )
25
+ const close = ( ) => window . close ( )
27
26
28
27
return (
29
28
< AppWrapper >
30
29
< Grid className = "centered pt-4" container spacing = { 1 } >
31
30
< Grid item xs = { 12 } >
32
31
< Typography variant = "subtitle1" > { status } </ Typography >
33
32
</ Grid >
34
- { status === completeStatus && (
35
- < >
36
- < Grid item xs = { 6 } >
37
- < Button onClick = { closeUpdateNotifier } variant = "outlined" >
38
- OK
39
- </ Button >
40
- </ Grid >
41
- < Grid item xs = { 6 } >
42
- < Button onClick = { completeUpdateNotifier } variant = "contained" >
43
- Restart Now
44
- </ Button >
45
- </ Grid >
46
- </ >
47
- ) }
48
- { status . startsWith ( 'Error' ) && (
33
+ { status === completeStatus && (
34
+ < >
35
+ < Grid item xs = { 6 } >
36
+ < Button onClick = { close } variant = "outlined" >
37
+ OK
38
+ </ Button >
39
+ </ Grid >
40
+ < Grid item xs = { 6 } >
41
+ < Button onClick = { doRestart } variant = "contained" >
42
+ Restart
43
+ </ Button >
44
+ </ Grid >
45
+ </ >
46
+ ) }
47
+ { status . startsWith ( 'Error' ) && (
49
48
< Grid item xs = { 12 } >
50
- < Button onClick = { closeUpdateNotifier } variant = "outlined" >
49
+ < Button onClick = { close } variant = "outlined" >
51
50
OK
52
51
</ Button >
53
52
</ Grid >
54
- ) }
53
+ ) }
55
54
</ Grid >
56
55
</ AppWrapper >
57
56
)
0 commit comments