From 19324ab232eb6b13be8cfa98aee7eef37a1e7c39 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Tue, 7 Feb 2023 23:18:41 -0500 Subject: [PATCH] "Limit reached" chips --- web/public/static/langs/en.json | 1 + web/src/components/SubscribeDialog.js | 9 +++++++-- web/src/components/SubscriptionPopup.js | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/web/public/static/langs/en.json b/web/public/static/langs/en.json index 4321a77..33c47e1 100644 --- a/web/public/static/langs/en.json +++ b/web/public/static/langs/en.json @@ -22,6 +22,7 @@ "action_bar_reservation_add": "Reserve topic", "action_bar_reservation_edit": "Change reservation", "action_bar_reservation_delete": "Remove reservation", + "action_bar_reservation_limit_reached": "Limit reached", "action_bar_send_test_notification": "Send test notification", "action_bar_clear_notifications": "Clear all notifications", "action_bar_unsubscribe": "Unsubscribe", diff --git a/web/src/components/SubscribeDialog.js b/web/src/components/SubscribeDialog.js index 2e1043c..834e58f 100644 --- a/web/src/components/SubscribeDialog.js +++ b/web/src/components/SubscribeDialog.js @@ -6,7 +6,7 @@ import Dialog from '@mui/material/Dialog'; import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; -import {Autocomplete, Checkbox, FormControlLabel, FormGroup, useMediaQuery} from "@mui/material"; +import {Autocomplete, Checkbox, Chip, FormControlLabel, FormGroup, useMediaQuery} from "@mui/material"; import theme from "./theme"; import api from "../app/Api"; import {randomAlphanumericString, topicUrl, validTopic, validUrl} from "../app/utils"; @@ -178,7 +178,12 @@ const SubscribePage = (props) => { }} /> } - label={t("reserve_dialog_checkbox_label")} + label={ + <> + {t("reserve_dialog_checkbox_label")} + + + } /> {reserveTopicVisible && { const { t } = useTranslation(); @@ -137,7 +138,12 @@ const SubscriptionPopup = (props) => { > {t("action_bar_change_display_name")} {showReservationAdd && {t("action_bar_reservation_add")}} - {showReservationAddDisabled && {t("action_bar_reservation_add")}} + {showReservationAddDisabled && + + {t("action_bar_reservation_add")} + + + } {showReservationEdit && {t("action_bar_reservation_edit")}} {showReservationDelete && {t("action_bar_reservation_delete")}} {t("action_bar_send_test_notification")}