You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Tony Air d787b36857
FIX: JS file Path
9 months ago
_config IMPR: add change password URL. Ref: https://web.dev/change-password-url/ 1 year ago
client Webpack upd, Offline image placeholder 10 months ago
src FIX: JS file Path 9 months ago
templates IMPR: More debug logging 3 years ago
.editorconfig Offline Caching service worker 3 years ago
.eslintignore Offline Caching service worker 3 years ago
.eslintrc Offline Caching service worker 3 years ago
.gitignore Offline Caching service worker 3 years ago
.npmrc Build system update 2 years ago
LICENSE First commit 5 years ago
README.md Povide SWVersion to templates 3 years ago
_config.php Compatibility config file 2 years ago
babel.config.json Webpack upd, Offline image placeholder 10 months ago
composer.json FIX: expose issue 2 years ago
eslint.config.json Webpack upd, Offline image placeholder 10 months ago
package.json Webpack upd, Offline image placeholder 10 months ago
pnpm-lock.yaml Webpack upd, Offline image placeholder 10 months ago
sass-lint.yml Webpack upd, Offline image placeholder 10 months ago
webpack.config.common.js Webpack upd, Offline image placeholder 10 months ago
webpack.config.js Webpack upd, Offline image placeholder 10 months ago
webpack.config.serve.js Webpack upd, Offline image placeholder 10 months ago
webpack.yml Webpack upd, Offline image placeholder 10 months ago

README.md

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}" />