File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 28
28
return {
29
29
detaInstance: undefined ,
30
30
saveText: ' Save Settings' ,
31
- error: undefined
31
+ error: undefined ,
32
+ closeAfterUpdate: false
32
33
}
33
34
},
34
35
methods: {
51
52
this .saveText = ' Saved!'
52
53
this .error = undefined
53
54
55
+ // Close window after configuration on installation
56
+ if (this .closeAfterUpdate ) {
57
+ setTimeout (() => {
58
+ window .close ()
59
+ }, 500 )
60
+ }
61
+
54
62
setTimeout (() => {
55
63
this .saveText = ' Save Settings'
56
64
}, 2000 )
90
98
},
91
99
created () {
92
100
chrome .storage .local .get ((items ) => {
101
+ // detaInstance will be undefined on installation
102
+ if (! items .detaInstance ) {
103
+ this .closeAfterUpdate = true
104
+ return
105
+ }
106
+
93
107
this .detaInstance = items .detaInstance
94
108
})
95
109
}
You can’t perform that action at this time.
0 commit comments