Replace Web Push and its service worker with page notifications over SSE
This commit is contained in:
Vendored
+4
@@ -1,4 +1,5 @@
|
||||
import { get, put, subscribe } from "./api.js";
|
||||
import { notifyInbox } from "./notifications.js";
|
||||
export const tabs = ["transcript", "changes", "files", "terminal", "preview", "inbox", "reviews", "project"];
|
||||
export const state = {
|
||||
me: undefined,
|
||||
@@ -258,6 +259,9 @@ export function handleEvent(ev) {
|
||||
}
|
||||
break;
|
||||
case "inbox.created":
|
||||
notifyInbox(ev.payload);
|
||||
void loadInbox();
|
||||
break;
|
||||
case "inbox.updated":
|
||||
void loadInbox();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user