bunch of fixes for PWA, set up web push notifications, add buttons to remove service workers, add settings menu, let settings manage keys, permissions, and service worker registration

This commit is contained in:
2024-02-04 22:57:52 -05:00
parent c3db0e6002
commit c13003cd6f
22 changed files with 506 additions and 190 deletions

View File

@@ -1,6 +1,13 @@
import { signal } from "uhtml/preactive";
import { Route } from "../router";
export const API_BASE_URL = new URL(
import.meta.env.VITE_API_BASE_URL || "http://localhost:3000"
);
export const BASE_URL = new URL(
import.meta.env.VITE_BASE_URL || "http://localhost:3000"
);
// the current page / params for this URL
export const page = signal(Route.Receive);
export const params = signal(
@@ -12,3 +19,5 @@ export enum LOCAL_STORAGE_KEYS {
ECDH_PUBLIC_KEY = "ecdhPublic",
ECDH_PRIVATE_KEY = "ecdhPrivate",
}
export const hasServiceWorkers = signal(false);