* Revert src/constants/app.ts and/or package.json, edit package.json to increment version & add "-beta", `npm install`, and commit.
@ -112,10 +112,10 @@ To add an icon, add to main.ts and reference with `fa` element and `icon` attrib
### Clear/Reset data & restart
### Clear/Reset data & restart
* Clear cache for site. (In Chrome, go to `chrome://settings/cookies` and "all site data and permissions"; in Firefox, go to `about:preferences` and search for "cache" then "Manage Data".)
* Clear cache for site. (In Chrome, go to `chrome://settings/cookies` and "all site data and permissions"; in Firefox, go to `about:preferences` and search for "cache" then "Manage Data", and also manually remove the IndexedDB data if the DBs still show.)
* Unregister service worker (in Chrome, go to `chrome://serviceworker-internals/`; in Firefox, go to `about:serviceworkers`).
* Clear notification permission. (in Chrome, go to `chrome://settings/content/notifications`; in Firefox, go to `about:preferences` and search for "notifications".)
* Clear notification permission (in Chrome, go to `chrome://settings/content/notifications`; in Firefox, go to `about:preferences` and search for "notifications").
* Unregister service worker. (in Chrome, go to `chrome://serviceworker-internals/`; in Firefox, go to `about:serviceworkers`.)
* Clear Cache Storage (in Chrome, in dev tools under Application; in Firefox, in dev tools under Storage).
* Clear Cache Storage. (in Chrome, in dev tools under Application; in Firefox, in dev tools under Storage.)
logConsoleAndDb("Service worker received a push event.",text,event);
event.waitUntil(
event.waitUntil(
(async()=>{
(async()=>{
try{
try{
letpayload;
letpayload;
if(event.data){
if(text){
payload=JSON.parse(event.data.text());
try{
payload=JSON.parse(text);
}catch(e){
// don't use payload since it is not JSON
}
}
// This is shared with the notification-test code and should be a constant. Look for the same name in HelpNotificationsView.vue
// Use something other than "Daily Update" https://gitea.anomalistdesign.com/trent_larson/py-push-server/src/commit/3c0e196c11bc98060ec5934e99e7dbd591b5da4d/app.py#L213
constDIRECT_PUSH_TITLE="DIRECT_NOTIFICATION";
lettitle="Generic Notification";
letmessage="Got some empty message.";
if(payload&&payload.title==DIRECT_PUSH_TITLE){
// skip any search logic and show the message directly
title="Direct Message";
message=payload.message||"No details were provided.";