PWA time
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Sam Therapy 2023-04-12 14:55:36 +02:00
parent a6a77233c8
commit 440c2c15b6
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
5 changed files with 29 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
TARGET="pleroma@froth.zone:/opt/pleroma-zero"
TARGET="pleroma@froth.zone:/var/www/pleroma/zero"
#rsync -ra public/ "${TARGET}/instance/static"
#cp dist/index.html "${TARGET}/instance/static/index.html"

View File

@ -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>

View File

@ -6,7 +6,7 @@
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"build": "NODE_OPTIONS=--openssl-legacy-provider node build/build.js",
"build": "node build/build.js",
"unit": "karma start test/unit/karma.conf.js --single-run",
"unit:watch": "karma start test/unit/karma.conf.js --single-run=false",
"e2e": "node test/e2e/runner.js",
@ -121,5 +121,8 @@
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"volta": {
"node": "16.20.0"
}
}

View File

@ -66,6 +66,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 {

View File

@ -366,6 +366,15 @@ __metadata:
languageName: node
linkType: hard
"@babel/parser@npm:^7.20.13, @babel/parser@npm:^7.7.0":
version: 7.21.4
resolution: "@babel/parser@npm:7.21.4"
bin:
parser: ./bin/babel-parser.js
checksum: 81a67bf3a21c17cce5fb76f55ba4b7e7427a33893b9f3af21e2b12bfb5f76ea11b832a6a510f7fcbacbc094f15a2a9add8514798dbe4ab49ac9985f2dce643a0
languageName: node
linkType: hard
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.18.6":
version: 7.18.6
resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.18.6"