Browse Source

Use full URL in curl example on empty topic pages, closes #1535, closes #1435

binwiederhier 1 month ago
parent
commit
946a2b6fbe
2 changed files with 8 additions and 7 deletions
  1. 3 2
      docs/releases.md
  2. 5 5
      web/src/components/Notifications.jsx

+ 3 - 2
docs/releases.md

@@ -1669,7 +1669,8 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
 
 
 **Bug fixes + maintenance:**
 **Bug fixes + maintenance:**
 
 
-* Web: Fix markdown message line height to match plain text (1.5 instead of 1.2) ([#1139](https://github.com/binwiederhier/ntfy/issues/1139), thanks to [@etfz](https://github.com/etfz))
+* Web: Fix Markdown message line height to match plain text (1.5 instead of 1.2) ([#1139](https://github.com/binwiederhier/ntfy/issues/1139), thanks to [@etfz](https://github.com/etfz))
+* Web: Use full URL in curl example on empty topic pages ([#1435](https://github.com/binwiederhier/ntfy/issues/1435), [#1535](https://github.com/binwiederhier/ntfy/pull/1535), thanks to [@elmatadoor](https://github.com/elmatadoor) for reporting and [@jjasghar](https://github.com/jjasghar) for the PR)
 * Web: Add validation feedback for service URL when adding user ([#1566](https://github.com/binwiederhier/ntfy/issues/1566), thanks to [@jermanuts](https://github.com/jermanuts))
 * Web: Add validation feedback for service URL when adding user ([#1566](https://github.com/binwiederhier/ntfy/issues/1566), thanks to [@jermanuts](https://github.com/jermanuts))
 * Docs: Remove obsolete `version` field from docker-compose examples ([#1333](https://github.com/binwiederhier/ntfy/issues/1333), thanks to [@seals187](https://github.com/seals187) for reporting and [@cyb3rko](https://github.com/cyb3rko) for fixing)
 * Docs: Remove obsolete `version` field from docker-compose examples ([#1333](https://github.com/binwiederhier/ntfy/issues/1333), thanks to [@seals187](https://github.com/seals187) for reporting and [@cyb3rko](https://github.com/cyb3rko) for fixing)
-* Docs: Fix Kustomize config - correct volumeMount path and volumes indentation ([#1367](https://github.com/binwiederhier/ntfy/issues/1367), thanks to [@toby-griffiths](https://github.com/toby-griffiths))
+* Docs: Fix Kustomize config in installation docs ([#1367](https://github.com/binwiederhier/ntfy/issues/1367), thanks to [@toby-griffiths](https://github.com/toby-griffiths))

+ 5 - 5
web/src/components/Notifications.jsx

@@ -33,7 +33,7 @@ import {
   maybeActionErrors,
   maybeActionErrors,
   openUrl,
   openUrl,
   shortUrl,
   shortUrl,
-  topicShortUrl,
+  topicUrl,
   unmatchedTags,
   unmatchedTags,
 } from "../app/utils";
 } from "../app/utils";
 import { formatMessage, formatTitle, isImage } from "../app/notificationUtils";
 import { formatMessage, formatTitle, isImage } from "../app/notificationUtils";
@@ -588,7 +588,7 @@ const UserAction = (props) => {
 
 
 const NoNotifications = (props) => {
 const NoNotifications = (props) => {
   const { t } = useTranslation();
   const { t } = useTranslation();
-  const topicShortUrlResolved = topicShortUrl(props.subscription.baseUrl, props.subscription.topic);
+  const topicUrlResolved = topicUrl(props.subscription.baseUrl, props.subscription.topic);
   return (
   return (
     <VerticallyCenteredContainer maxWidth="xs">
     <VerticallyCenteredContainer maxWidth="xs">
       <Typography variant="h5" align="center" sx={{ paddingBottom: 1 }}>
       <Typography variant="h5" align="center" sx={{ paddingBottom: 1 }}>
@@ -601,7 +601,7 @@ const NoNotifications = (props) => {
         {t("notifications_example")}:<br />
         {t("notifications_example")}:<br />
         <tt>
         <tt>
           {'$ curl -d "Hi" '}
           {'$ curl -d "Hi" '}
-          {topicShortUrlResolved}
+          {topicUrlResolved}
         </tt>
         </tt>
       </Paragraph>
       </Paragraph>
       <Paragraph>
       <Paragraph>
@@ -614,7 +614,7 @@ const NoNotifications = (props) => {
 const NoNotificationsWithoutSubscription = (props) => {
 const NoNotificationsWithoutSubscription = (props) => {
   const { t } = useTranslation();
   const { t } = useTranslation();
   const subscription = props.subscriptions[0];
   const subscription = props.subscriptions[0];
-  const topicShortUrlResolved = topicShortUrl(subscription.baseUrl, subscription.topic);
+  const topicUrlResolved = topicUrl(subscription.baseUrl, subscription.topic);
   return (
   return (
     <VerticallyCenteredContainer maxWidth="xs">
     <VerticallyCenteredContainer maxWidth="xs">
       <Typography variant="h5" align="center" sx={{ paddingBottom: 1 }}>
       <Typography variant="h5" align="center" sx={{ paddingBottom: 1 }}>
@@ -627,7 +627,7 @@ const NoNotificationsWithoutSubscription = (props) => {
         {t("notifications_example")}:<br />
         {t("notifications_example")}:<br />
         <tt>
         <tt>
           {'$ curl -d "Hi" '}
           {'$ curl -d "Hi" '}
-          {topicShortUrlResolved}
+          {topicUrlResolved}
         </tt>
         </tt>
       </Paragraph>
       </Paragraph>
       <Paragraph>
       <Paragraph>