Go to file
2024-03-12 03:37:50 +02:00
_config IMPR: add change password URL. Ref: https://web.dev/change-password-url/ 2022-01-07 20:33:51 +02:00
client IMPR: Skip captcha caching 2024-03-11 20:08:26 +02:00
src FIX: JS file Path 2022-06-13 22:10:42 +02:00
templates IMPR: More debug logging 2020-04-02 07:07:24 +07:00
_config.php Compatibility config file 2020-11-28 19:09:04 +07:00
.editorconfig Offline Caching service worker 2020-04-02 06:41:49 +07:00
.eslintignore Offline Caching service worker 2020-04-02 06:41:49 +07:00
.eslintrc Offline Caching service worker 2020-04-02 06:41:49 +07:00
.gitignore Offline Caching service worker 2020-04-02 06:41:49 +07:00
.npmrc Build system update 2020-11-28 18:38:07 +07:00
babel.config.json Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
composer.json IMPR: SS5 test 2024-03-12 03:37:50 +02:00
eslint.config.json Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
LICENSE First commit 2018-06-24 15:51:50 +02:00
package.json Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
pnpm-lock.yaml Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
README.md Povide SWVersion to templates 2020-04-03 02:44:18 +07:00
sass-lint.yml Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
webpack.config.common.js Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
webpack.config.js Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
webpack.config.serve.js Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00
webpack.yml Webpack upd, Offline image placeholder 2022-05-21 23:42:33 +02:00

SilverStripe Progressive Web App

Tools to add progressive web app functionality to your silverstripe website And make it available offline

Installation

composer require a2nt/silverstripe-progressivewebapp

Usage

  • Install the module, run dev/build and fill in the settings in the siteconfig
  • Add js to register the service worker (example can be found at client/src/app.js)
if ('serviceWorker' in navigator) {
  var baseHref = (document.getElementsByTagName('base')[0] || {}).href;
  var version = (document.querySelector('meta[name="swversion"]') || {})
    .content;
  if (baseHref) {
    navigator.serviceWorker
      .register(baseHref + 'sw.js?v=' + version)
      .then(() => {
        console.log('SW: Registered');
      });
  }
}
  • Add the following tags to the head of your website
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="{$BaseHref}manifest.json" />
<meta name="swversion" content="{$SWVersion}" />