diff --git a/.env.template b/.env.template index 87558908..4e2b334a 100644 --- a/.env.template +++ b/.env.template @@ -14,8 +14,6 @@ VITE_INDEXER_RELAYS=purplepag.es,relay.damus.io,indexer.coracle.social VITE_DEFAULT_RELAYS=relay.damus.io,relay.primal.net,nostr.mom VITE_DEFAULT_MESSAGING_RELAYS=auth.nostr1.com VITE_SIGNER_RELAYS=relay.nsec.app,ephemeral.snowflare.cc,bucket.coracle.social -VITE_NOTIFIER_PUBKEY=27b7c2ed89ef78322114225ea3ebf5f72c7767c2528d4d0c1854d039c00085df -VITE_NOTIFIER_RELAY=anchor.coracle.social VITE_VAPID_PUBLIC_KEY=BIt2D4BdgdbCowD_0d3Np6GbrIGHxd7aIEUeZNe3hQuRlHz02OhzvDaai0XSFoJYVzSzdMjdyW-QhvW9_yq8j4Y VITE_GLITCHTIP_API_KEY= GLITCHTIP_AUTH_TOKEN= diff --git a/src/app/components/AlertAdd.svelte b/src/app/components/AlertAdd.svelte deleted file mode 100644 index 0e0a1e4b..00000000 --- a/src/app/components/AlertAdd.svelte +++ /dev/null @@ -1,217 +0,0 @@ - - -
- - {#snippet title()} - Add an Alert - {/snippet} - {#snippet info()} - Enable notifications to keep up to date on activity you care about. - {/snippet} - - {#if canSendPushNotifications()} - - {#snippet label()} -

Alert Type*

- {/snippet} - {#snippet input()} - - {/snippet} -
- {/if} - {#if channel === "email"} - - {#snippet label()} -

Email Address*

- {/snippet} - {#snippet input()} - - {/snippet} -
- - {#snippet label()} -

Frequency*

- {/snippet} - {#snippet input()} - - {/snippet} -
- {/if} - {#if !hideSpaceField} - - {#snippet label()} -

Space*

- {/snippet} - {#snippet input()} - - {/snippet} -
- {/if} - - {#snippet label()} -

Notifications*

- {/snippet} - {#snippet input()} -
- - - Threads - - - - Calendar - - - - Chat - -
- {/snippet} -
- - - - -
diff --git a/src/app/components/AlertDelete.svelte b/src/app/components/AlertDelete.svelte deleted file mode 100644 index 37708f64..00000000 --- a/src/app/components/AlertDelete.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/src/app/components/AlertItem.svelte b/src/app/components/AlertItem.svelte deleted file mode 100644 index 4adab9c4..00000000 --- a/src/app/components/AlertItem.svelte +++ /dev/null @@ -1,42 +0,0 @@ - - -
-
- -
{description}
-
- -
diff --git a/src/app/components/AlertStatus.svelte b/src/app/components/AlertStatus.svelte deleted file mode 100644 index 430832c4..00000000 --- a/src/app/components/AlertStatus.svelte +++ /dev/null @@ -1,42 +0,0 @@ - - -{#if $status} - {@const statusText = getTagValue("status", $status.tags) || "error"} - {#if statusText === "ok"} - - Active - - {:else if statusText === "pending"} - - Pending - - {:else} - - {statusText.replace("-", " ").replace(/^(.)/, x => x.toUpperCase())} - - {/if} -{:else} - - Inactive - -{/if} diff --git a/src/app/components/Alerts.svelte b/src/app/components/Alerts.svelte deleted file mode 100644 index e621f943..00000000 --- a/src/app/components/Alerts.svelte +++ /dev/null @@ -1,155 +0,0 @@ - - -
-
-
- - - Alerts - - -
-
- {#each filteredAlerts as alert (alert.event.id)} - - {:else} -

Nothing here yet!

- {/each} -
-
-
-
- - - Notifications - -
-
-

Notify me about new direct messages

- -
-
-

Show badge for unread direct messages

- -
-
-

Play sound for new direct messages

- -
- {#if $dmStatus} - {@const status = getTagValue("status", $dmStatus.tags) || "error"} - {#if status !== "ok"} -
-

- {getTagValue("message", $dmStatus.tags) || - "The notification server did not respond to your request."} -

-
- {/if} - {/if} -
-
diff --git a/src/app/components/ChatMenu.svelte b/src/app/components/ChatMenu.svelte index ac18c246..0e9504a1 100644 --- a/src/app/components/ChatMenu.svelte +++ b/src/app/components/ChatMenu.svelte @@ -1,19 +1,15 @@
@@ -66,19 +32,15 @@ Mark all read - {#if (!enablingAlert && $dmAlert) || disablingAlert} - {:else} - {/if}
diff --git a/src/app/components/NewNotificationSound.svelte b/src/app/components/NewNotificationSound.svelte index f654f96f..7fcd7e30 100644 --- a/src/app/components/NewNotificationSound.svelte +++ b/src/app/components/NewNotificationSound.svelte @@ -18,7 +18,7 @@ let notificationCount = $state($notifications.size) const playSound = () => { - if (enabled && $userSettingsValues.play_notification_sound) { + if (enabled && $userSettingsValues.alerts_sound) { audioElement?.play() } } diff --git a/src/app/components/SpaceMenu.svelte b/src/app/components/SpaceMenu.svelte index cdaf49fb..25a2ab9c 100644 --- a/src/app/components/SpaceMenu.svelte +++ b/src/app/components/SpaceMenu.svelte @@ -1,8 +1,7 @@ -
- -
+
+
+ Alert Settings +
+

Show badge for unread alerts

+ +
+
+

Play sound for new messages

+ +
+
+ + + Space Activity + +
+
+

Notify me about new messages

+ +
+
+

Always notify me when mentioned

+ +
+ +
+ + + Direct Messages + +
+
+

Notify me about new messages

+ +
+
+ + +
+
+
diff --git a/src/routes/settings/privacy/+page.svelte b/src/routes/settings/privacy/+page.svelte index 3dfccec0..37540384 100644 --- a/src/routes/settings/privacy/+page.svelte +++ b/src/routes/settings/privacy/+page.svelte @@ -1,6 +1,5 @@
-
+
Privacy Settings - - {#snippet label()} -

Authenticate with unknown relays?

- {/snippet} - {#snippet input()} - - {/snippet} - {#snippet info()} -

- Controls whether {PLATFORM_NAME} will identify you to relays not in your lists. -

- {/snippet} -
- - {#snippet label()} -

Report errors?

- {/snippet} - {#snippet input()} - - {/snippet} - {#snippet info()} -

- Allow {PLATFORM_NAME} to send error reports to help improve the app. -

- {/snippet} -
- - {#snippet label()} -

Report usage?

- {/snippet} - {#snippet input()} - - {/snippet} - {#snippet info()} -

- Allow {PLATFORM_NAME} to collect anonymous usage data. -

- {/snippet} -
+
+

Authenticate with unknown relays?

+ +

+ Controls whether {PLATFORM_NAME} will identify you to relays not in your lists. +

+
+
+

Report errors?

+ +

+ Allow {PLATFORM_NAME} to send error reports to help improve the app. +

+
+
+

Report usage?

+ +

+ Allow {PLATFORM_NAME} to collect anonymous usage data. +

+
diff --git a/src/service-worker.js b/src/service-worker.js deleted file mode 100644 index 3cb5f4fc..00000000 --- a/src/service-worker.js +++ /dev/null @@ -1,90 +0,0 @@ -/* global clients */ - -import * as nip19 from "nostr-tools/nip19" - -self.addEventListener("install", event => { - self.skipWaiting() -}) - -self.addEventListener("activate", event => { - event.waitUntil(self.clients.claim()) -}) - -self.addEventListener("push", e => { - console.log("Service Worker: Push event received", e) - - let url = "/" - let title = "New activity" - let body = "You have a new message" - - try { - const data = e.data?.json() - - if (data?.event) { - url += nip19.neventEncode({ - id: data.event.id, - relays: data.relays || [], - }) - } - - if (data?.title) { - title = data.title - } - - if (data?.body) { - body = data.body - } - } catch (e) { - console.log("Service Worker: Failed to parse push data", e) - } - - e.waitUntil( - self.registration.showNotification(title, { - body, - data: {url}, - icon: "/pwa-192x192.png", - badge: "/pwa-64x64.png", - tag: "flotilla-notification", - requireInteraction: false, - }), - ) -}) - -self.addEventListener("notificationclick", e => { - console.log("Service Worker: Notification click event", e) - - e.notification.close() - - if (e.action === "close") { - return - } - - // Default action or 'open' action - const url = e.notification.data?.url - - e.waitUntil( - clients - .matchAll({ - type: "window", - includeUncontrolled: true, - }) - .then(clientList => { - // Check if app is already open and send navigation message - for (const client of clientList) { - if (client.url.includes(location.origin)) { - client.postMessage({ - type: "NAVIGATE", - url: url, - }) - - return client.focus() - } - } - - // Open new window if app is not open - if (clients.openWindow) { - return clients.openWindow(url) - } - }), - ) -})