Added beforeinstallprompt listener

This commit is contained in:
Fabio Manganiello 2023-05-20 02:33:26 +02:00
parent 9ba7ad9402
commit 14d6924338
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -68,6 +68,14 @@ export default {
this.initConfig() this.initConfig()
}, },
beforeMount() {
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault()
if (confirm('Would you like to install the application for more features?'))
e.prompt()
})
},
mounted() { mounted() {
bus.onNotification(this.onNotification) bus.onNotification(this.onNotification)
}, },