diff --git a/webapp/.eslintignore b/webapp/.eslintignore index d56900caf..be90fc8e3 100644 --- a/webapp/.eslintignore +++ b/webapp/.eslintignore @@ -3,3 +3,4 @@ build .nuxt styleguide/ **/*.min.js +static/sw.js diff --git a/webapp/.gitignore b/webapp/.gitignore index f8c980f7c..dca219bb5 100644 --- a/webapp/.gitignore +++ b/webapp/.gitignore @@ -84,3 +84,5 @@ cypress.env.json # Apple macOS folder attribute file .DS_Store + +sw.* diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js index a801d3a34..5e7726d43 100644 --- a/webapp/nuxt.config.js +++ b/webapp/nuxt.config.js @@ -221,6 +221,7 @@ export default { '@nuxtjs/axios', '@nuxtjs/style-resources', '@nuxtjs/sentry', + '@nuxtjs/pwa', ], /* @@ -294,10 +295,12 @@ export default { }, manifest: { - name: 'Human-Connection.org', - description: 'Human-Connection.org', - theme_color: '#ffffff', - lang: 'de', + name: 'Human Connection', + short_name: 'HC', + homepage_url: 'https://human-connection.org/', + description: 'The free and open source social network for active citizenship', + theme_color: '#17b53f', + lang: 'en', }, /* diff --git a/webapp/package.json b/webapp/package.json index 598412568..adea8fd6d 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -55,6 +55,7 @@ "@nuxtjs/apollo": "^4.0.0-rc13.1", "@nuxtjs/axios": "~5.6.0", "@nuxtjs/dotenv": "~1.4.1", + "@nuxtjs/pwa": "^3.0.0-beta.19", "@nuxtjs/sentry": "^3.0.0", "@nuxtjs/style-resources": "~1.0.0", "accounting": "~0.4.1", diff --git a/webapp/static/icon.png b/webapp/static/icon.png new file mode 100644 index 000000000..bb9532676 Binary files /dev/null and b/webapp/static/icon.png differ diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 6fdcc9134..ff2ba5dbe 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -1495,6 +1495,18 @@ consola "^2.5.6" http-proxy-middleware "^0.19.1" +"@nuxtjs/pwa@^3.0.0-beta.19": + version "3.0.0-beta.19" + resolved "https://registry.yarnpkg.com/@nuxtjs/pwa/-/pwa-3.0.0-beta.19.tgz#4685c8137a5b588126b3ee4d469f6806423f958f" + integrity sha512-5c7CB2qrrlpu7BmJeWX9GN//uK1SiEzBbT+ykH11ZfUxQyXiO3QTm1f6tTOnG/P5v4kRIGYdBr0wmRbA/Hv1cw== + dependencies: + defu "^0.0.3" + execa "^1.0.0" + fs-extra "^8.1.0" + hasha "^5.0.0" + jimp-compact "^0.8.0" + workbox-cdn "^4.3.1" + "@nuxtjs/sentry@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@nuxtjs/sentry/-/sentry-3.0.0.tgz#7ca3a25b7b2ea35a953292a7961deb515a6d9140" @@ -5937,6 +5949,11 @@ defu@^0.0.1: resolved "https://registry.yarnpkg.com/defu/-/defu-0.0.1.tgz#74dc4d64e401d7f95c6755fe98bc5cd688833a8f" integrity sha512-Pz9yznbSzVTNA67lcfqVnktROx2BrrBBcmQqGrfe0zdiN5pl5GQogLA4uaP3U1pR1LHIZpEYTAh2sn+v4rH1dA== +defu@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/defu/-/defu-0.0.3.tgz#bdc3ea1e1ab2120d4d4a129147f3ba9b7f9fe103" + integrity sha512-u/fe4fBwrD0KACvI0sYWTWFzooqONZq8ywPnK0ZkAgLNwaDTKpSWvMiiU4QmzhrQCXu8Y0+HIWP8amE18lsL4A== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -7906,6 +7923,14 @@ hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasha@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.1.0.tgz#dd05ccdfcfe7dab626247ce2a58efe461922f4ca" + integrity sha512-OFPDWmzPN1l7atOV1TgBVmNtBxaIysToK6Ve9DK+vT6pYuklw/nPNT+HJbZi0KDcI6vWB+9tgvZ5YD7fA3CXcA== + dependencies: + is-stream "^2.0.0" + type-fest "^0.8.0" + hast-util-parse-selector@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.2.tgz#66aabccb252c47d94975f50a281446955160380b" @@ -9304,6 +9329,11 @@ jest@~24.9.0: import-local "^2.0.0" jest-cli "^24.9.0" +jimp-compact@^0.8.0: + version "0.8.4" + resolved "https://registry.yarnpkg.com/jimp-compact/-/jimp-compact-0.8.4.tgz#0878a0c30f22d2d4f8b33e96722eb09d20770627" + integrity sha512-9mvZ7/TJ28bWtdx0RxmfiOTzSom4zuRniFTLtJHfNL6HxQdnRtjmX8XIRjmofgVXj2TW/GgSuZKB3dSZ5hNhKg== + js-base64@^2.1.8: version "2.5.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121" @@ -14748,6 +14778,11 @@ type-fest@^0.5.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2" integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw== +type-fest@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.0.tgz#ee92ee2ec95479869dec66d17d9698666b90f29d" + integrity sha512-M8BLNtxNWRbRmJ8Iu+4j4qZLlE7Y75ldC42cvw9KPOFkFwY/KlSJuj9eeGmoB/k3QAAnuN3M35Z59+lBm1+C+g== + type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -15594,6 +15629,11 @@ wordwrap@~1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= +workbox-cdn@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/workbox-cdn/-/workbox-cdn-4.3.1.tgz#f1ffed5368c20291048498ba0744baf27dbd7294" + integrity sha512-Adkgo+/7S+bBsDTzdeH0xxQCrfBM1EiyZlvu1tMh0cJ/ipC6TtA8KDr12PBREdbL0zO9hG+7OSzvi2NLchPAEg== + worker-farm@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8"