We PWA now
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
e8083c898d
commit
7ad4e2d2b1
69 changed files with 15 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,6 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
|
||||
<!--server-generated-meta-->
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
</head>
|
||||
<body class="hidden">
|
||||
<noscript>To use Pleroma, please enable JavaScript.</noscript>
|
||||
|
|
14
src/main.js
14
src/main.js
|
@ -56,6 +56,20 @@ const persistedStateOptions = {
|
|||
};
|
||||
|
||||
(async () => {
|
||||
if ('serviceWorker' in navigator) {
|
||||
// declaring scope manually
|
||||
navigator.serviceWorker.register('/sw-pleroma.js', { scope: '/' }).then(
|
||||
(registration) => {
|
||||
console.log('Service worker registration succeeded:', registration)
|
||||
},
|
||||
/* catch */ (error) => {
|
||||
console.error(`Service worker registration failed: ${error}`)
|
||||
}
|
||||
)
|
||||
} else {
|
||||
console.error('Service workers are not supported.')
|
||||
}
|
||||
|
||||
let storageError = false
|
||||
const plugins = [pushNotifications]
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue