-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from Alexander-Bliznyuk/pick-up-new-version
fix: installed pwa does not pick up new version, closes #298
- Loading branch information
Showing
6 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<v-alert | ||
v-if="updateToBeInstalled" | ||
dense | ||
type="info" | ||
> | ||
<v-row align="center"> | ||
<v-col class="grow"> | ||
A new version is available | ||
</v-col> | ||
<v-col class="shrink"> | ||
<v-btn @click="refresh"> | ||
refresh | ||
</v-btn> | ||
</v-col> | ||
</v-row> | ||
</v-alert> | ||
</template> | ||
|
||
<script> | ||
import { mapState } from 'vuex' | ||
export default { | ||
name: 'UpdateNotification', | ||
computed: { | ||
...mapState({ | ||
updateToBeInstalled: state => state.updateToBeInstalled | ||
}) | ||
}, | ||
methods: { | ||
refresh () { | ||
this.updateToBeInstalled.postMessage( | ||
{ type: 'SKIP_WAITING' } | ||
) | ||
window.location.reload() | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters