From d9e5e08af5387ec872cf34f33723896f1cd330bc Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Tue, 8 Mar 2022 18:56:28 -0500 Subject: [PATCH] No notifications page text --- web/src/components/Notifications.js | 34 +++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/web/src/components/Notifications.js b/web/src/components/Notifications.js index 52456538..4ee471bb 100644 --- a/web/src/components/Notifications.js +++ b/web/src/components/Notifications.js @@ -29,12 +29,15 @@ const Notifications = (props) => { return (props.subscription) ? : ; } -const AllSubscriptions = () => { +const AllSubscriptions = (props) => { + const subscriptions = props.subscriptions; const notifications = useLiveQuery(() => subscriptionManager.getAllNotifications(), []); if (notifications === null || notifications === undefined) { return ; - } else if (notifications.length === 0) { + } else if (subscriptions.length === 0) { return ; + } else if (notifications.length === 0) { + return ; } return ; } @@ -308,6 +311,33 @@ const NoNotifications = (props) => { ); }; +const NoNotificationsWithoutSubscription = (props) => { + const subscription = props.subscriptions[0]; + const shortUrl = topicShortUrl(subscription.baseUrl, subscription.topic); + return ( + + + No notifications
+ You haven't received any notifications. +
+ + To send notifications to a topic, simply PUT or POST to the topic URL. Here's + an example using one of your topics. + + + Example:
+ + $ curl -d "Hi" {shortUrl} + +
+ + For more detailed instructions, check out the website or + {" "}documentation. + +
+ ); +}; + const NoSubscriptions = () => { return (