1.5.0 • Published 12 months ago

@lsretail/ls-push-notifications v1.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

ls-push-notifications

This package adds the following functionality:

  • Asking users for permission to send push notifications.
  • Sends push notifications if allowed once the order status gets changed.

To use enable push notifications, follow these steps:

  • Sign up for a OneSignal account.
  • Follow this guide after creating the account, to create an app OneSignal | Quickstart Guide
  • Create a the folder structure push/onesignal/ in the root of the venia-concept package and a file inside called OneSignalSDKWorker.js.
  • Copy this text into the file and save:
importScripts("https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
  • Add the following to venia-concept/upward.yml.
status: veniaResponse.status
headers: veniaResponse.headers
body: veniaResponse.body

+myStaticIncludes:
+  resolver: directory
+  directory:
+    resolver: inline
+    inline: './push'

Settings:

  • Add USE_SIMINIA_THEME=true to your .env file to use the package with a siminia theme.
1.5.0

12 months ago