File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -2,25 +2,16 @@ import Vue from "vue"
2
2
import App from "./app.vue"
3
3
4
4
const app = new Vue ( {
5
- computed : {
6
- updateReady : {
7
- get ( ) {
8
- return this . $refs . app . showUpdateReadyToast
9
- } ,
10
- set ( value ) {
11
- this . $refs . app . showUpdateReadyToast = value
12
- } ,
5
+ el : "#main" ,
6
+ methods : {
7
+ showUpdateReadyToast ( ) {
8
+ this . $refs . app . showUpdateReadyToast = true
13
9
} ,
14
10
} ,
15
11
render : ( h ) => h ( App , { ref : "app" } ) ,
16
12
} )
17
- app . $mount ( "#main" )
18
13
19
14
// Check update.
20
- window . addEventListener ( "load" , ( ) => {
21
- applicationCache . addEventListener ( "updateready" , ( ) => {
22
- if ( applicationCache . status === applicationCache . UPDATEREADY ) {
23
- app . updateReady = true
24
- }
25
- } )
15
+ applicationCache . addEventListener ( "updateready" , ( ) => {
16
+ app . showUpdateReadyToast ( )
26
17
} )
You can’t perform that action at this time.
0 commit comments