Add PWA + ServiceWorker with offline support

This commit is contained in:
Daniel Supernault 2021-06-17 22:42:08 -06:00
parent 22c321a998
commit 78ee44662c
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 68 additions and 1 deletions

61
public/offline.html Normal file

File diff suppressed because one or more lines are too long

BIN
public/sw.js vendored Normal file

Binary file not shown.

View file

@ -34,6 +34,12 @@ window.App.boot = function() {
new Vue({ el: '#content'}); new Vue({ el: '#content'});
} }
window.addEventListener("load", () => {
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js");
}
});
window.App.util = { window.App.util = {
compose: { compose: {
post: (function() { post: (function() {