pwa debug
This commit is contained in:
@@ -18,12 +18,12 @@ export class AppComponent {
|
||||
) {
|
||||
|
||||
console.log('Start versionUpdates subscribe', this._swUpdate.isEnabled, environment.production);
|
||||
if (this._swUpdate.isEnabled && environment.production) {
|
||||
this._swUpdate.versionUpdates.subscribe((evt) => {
|
||||
console.log('Version update', evt);
|
||||
if (evt.type === 'VERSION_READY') {
|
||||
console.log('tt');
|
||||
console.log('versionUpdates', evt);
|
||||
switch (evt.type) {
|
||||
case 'VERSION_READY':
|
||||
this._swUpdate.activateUpdate().then(() => {
|
||||
console.log('Update!');
|
||||
this._notifications.add({
|
||||
text: "New version available. DiunaBI will restart in 10 seconds.",
|
||||
duration: 10000,
|
||||
@@ -39,7 +39,9 @@ export class AppComponent {
|
||||
}
|
||||
})
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user