Improved support for Progressive Web Apps (PWA)
- modify webmanifest to use LNBITS_SITE_TITLE and LNBITS_CUSTOM_LOGO env vars - modify webmanifest to have a more accurate description, start_url and set theme_color to match default lnbits theme - add service worker to cache requests (chrome requires a registered service worker to activate some pwa functionality) - move webmanifest to <head> (chrome acts weird with it in the body)
This commit is contained in:
@@ -702,3 +702,10 @@ new Vue({
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
if (navigator.serviceWorker != null) {
|
||||
navigator.serviceWorker.register('/service-worker.js')
|
||||
.then(function(registration) {
|
||||
console.log('Registered events at scope: ', registration.scope);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user