var w=Object.defineProperty;var y=(n,t,o)=>t in n?w(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var f=(n,t,o)=>y(n,typeof t!="symbol"?t+"":t,o);import{V as v,e as x,M as S,C as k,_ as C,g as h,h as N,i as l,j as e,k as r,H as g,w as q,F as P,x as I}from"./index-BLqts8WY.js";import{Q as T}from"./QuickNav-DgCyvgDx.js";import{au as O,a as A}from"./index-MyY_xqVN.js";import{P as M}from"./PushNotificationPermission-9Wf_h46a.js";import"./index-CsfPLOYu.js";var W=Object.defineProperty,$=Object.getOwnPropertyDescriptor,D=(n,t,o,s)=>{for(var i=s>1?void 0:s?$(t,o):t,d=n.length-1,u;d>=0;d--)(u=n[d])&&(i=(s?u(t,o,i):u(i))||i);return s&&i&&W(t,o,i),i};let m=class extends v{constructor(){super(...arguments);f(this,"$notify");f(this,"subscriptionJSON")}async mounted(){var o;try{const s=await((o=navigator.serviceWorker)==null?void 0:o.ready),i=await(s==null?void 0:s.pushManager.getSubscription());this.subscriptionJSON=i==null?void 0:i.toJSON()}catch(s){console.error("Mount error:",s)}}alertWebPushSubscription(){console.log("Web push subscription:",JSON.parse(JSON.stringify(this.subscriptionJSON))),alert(JSON.stringify(this.subscriptionJSON))}async sendTestWebPushMessage(o=!1){if(!this.subscriptionJSON){this.$notify({group:"alert",type:"danger",title:"Not Subscribed",text:"You must enable notifications before testing the web push."},-1);return}try{await O(this.subscriptionJSON,o),this.$notify({group:"alert",type:"success",title:"Test Web Push Sent",text:"Check your device for the test web push message"+(o?".":" if there are new items in your feed.")},-1)}catch(s){console.error("Got an error sending test notification:",s),this.$notify({group:"alert",type:"danger",title:"Error Sending Test",text:"Got an error sending the test web push notification."},-1)}}showTestNotification(){var s;const o="It Worked";(s=navigator.serviceWorker)==null||s.ready.then(i=>i.showNotification(o,{body:"This is your test notification."})).then(()=>{this.$notify({group:"alert",type:"success",title:"Sent",text:`A notification was triggered, so one should show on your device entitled '${o}'.`},5e3)}).catch(i=>{console.error("Got a notification error:",i),this.$notify({group:"alert",type:"danger",title:"Failed",text:"Got an error sending a notification."},-1)})}showNotificationChoice(){this.$refs.pushNotificationPermission.open(A,async(o,s,i)=>{o&&(await x.settings.update(S,{notifyingReminderMessage:i,notifyingReminderTime:s}),this.notifyingReminder=!0,this.notifyingReminderMessage=i||"",this.notifyingReminderTime=s)})}};m=D([k({components:{PushNotificationPermission:M,QuickNav:T}})],m);const R=""+new URL("chrome-install-pwa-DuUggvhZ.png",import.meta.url).href,F=""+new URL("mac-installed-app-settings-B9fFiuKk.png",import.meta.url).href,V=""+new URL("windows-system-enable-notifications-Dpjdl83C.png",import.meta.url).href,H={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},J={class:"mb-8"},E={class:"text-lg text-center font-light relative px-7"},G={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"},U={class:"px-2"},B={href:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API#browser_compatibility",class:"text-blue-500",target:"_blank"};function Y(n,t,o,s,i,d){const u=h("QuickNav"),p=h("fa"),b=h("PushNotificationPermission"),c=h("router-link");return I(),N(P,null,[l(u),e("section",H,[e("div",J,[e("div",E,[e("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:t[0]||(t[0]=a=>n.$router.back())},[l(p,{icon:"chevron-left",class:"fa-fw"})])]),t[8]||(t[8]=e("h1",{id:"ViewHeading",class:"text-4xl text-center font-light pt-4 mb-8"}," Notification Help ",-1))]),e("div",null,[t[27]||(t[27]=e("p",null,"Here are ways to test notifications and get them working.",-1)),t[28]||(t[28]=e("h2",{class:"text-xl font-semibold mt-4"},"Full Test",-1)),e("div",null,[e("p",null,[t[9]||(t[9]=r(" If this works then you're all set. ")),e("button",{onClick:t[1]||(t[1]=a=>n.sendTestWebPushMessage(!0)),class:"block w-full text-center text-md bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-md mb-2"}," Send Yourself a Test Web Push Message (Through Push Server but Skipping Client Filter) ")])]),t[29]||(t[29]=e("h2",{class:"text-xl font-semibold mt-4"},"Android Users",-1)),t[30]||(t[30]=e("div",null,[e("p",null," Note that you may not receive notifications when the app is in the background. When you're done working, close the app, and then you'll get the reminder notifications. ")],-1)),t[31]||(t[31]=e("h2",{class:"text-xl font-semibold mt-4"}," If this app doesn't support notifications... ",-1)),t[32]||(t[32]=e("div",null,[e("p",null,[r(' To be notified of interesting updates, install this app on your device (as opposed to using it inside the browser app). In Chrome, it may prompt you, and you can also look for the "Install" command in the browser settings; on the the desktop, look for this icon in the address bar: '),e("img",{src:R,alt:"Chrome 'install' icon",class:"ml-4"})])],-1)),t[33]||(t[33]=e("h2",{class:"text-xl font-semibold mt-4"}," If you must enable notifications... ",-1)),e("div",null,[e("p",null,[e("button",{class:"text-blue-500",onClick:t[2]||(t[2]=a=>n.showNotificationChoice())}," Click here. "),l(b,{ref:"pushNotificationPermission"},null,512)])]),t[34]||(t[34]=g('
... and it never stops, then there is a problem with the underlying service worker or push server mechanism in your browser. Your best bet is to follow the "Reinstall" steps below or use a different browser.
In Apple iOS, check "Settings" -> "Notifications", look for the Time Safari app (or the browser you're using), and make sure notifications are enabled.
In Android, hold on to the app icon, then select "App Info", then "Notifications" and make sure they're enabled. If it's still a problem then go further:
If you installed the app with Chrome, make sure there are no other tabs with it open. Here are some ways to clear caches that can mess things up (and note that this clears out data from the installed app -- which is good to do while the app is installed):
On a Mac, go to "Settings" and check "Notifications".