- {session.exists() &&
-
setAccessAnchorEl(ev.currentTarget)} color="inherit" size="large" edge="start" sx={{height: "45px", marginTop: "5px", color: "grey"}}>
- {access === "public" && }
- {access === "public-read" && }
- {access === "private" && }
-
- }
+
{
open={!!accessAnchorEl}
onClose={() => setAccessAnchorEl(null)}
>
-
-
- }
- label={t("subscribe_dialog_subscribe_use_another_label")} />
- {anotherServerVisible &&
-
+ setReserveTopicVisible(ev.target.checked)}
+ inputProps={{
+ "aria-label": t("subscription_settings_dialog_reserve_topic_label")
+ }}
+ />
+ }
+ label={t("subscription_settings_dialog_reserve_topic_label")}
/>
- }
- />}
+ {reserveTopicVisible &&
+
+ }
+
+ }
+ {!reserveTopicVisible &&
+
+
+ }
+ label={t("subscribe_dialog_subscribe_use_another_label")}/>
+ {anotherServerVisible &&
+
+ }
+ />}
+
+ }
diff --git a/web/src/components/SubscriptionSettingsDialog.js b/web/src/components/SubscriptionSettingsDialog.js
index f6f5125a..7592262f 100644
--- a/web/src/components/SubscriptionSettingsDialog.js
+++ b/web/src/components/SubscriptionSettingsDialog.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 {Checkbox, FormControl, FormControlLabel, Select, useMediaQuery} from "@mui/material";
+import {Checkbox, FormControlLabel, useMediaQuery} from "@mui/material";
import theme from "./theme";
import subscriptionManager from "../app/SubscriptionManager";
import DialogFooter from "./DialogFooter";
@@ -14,11 +14,7 @@ import {useTranslation} from "react-i18next";
import accountApi, {UnauthorizedError} from "../app/AccountApi";
import session from "../app/Session";
import routes from "./routes";
-import MenuItem from "@mui/material/MenuItem";
-import ListItemIcon from "@mui/material/ListItemIcon";
-import LockIcon from "@mui/icons-material/Lock";
-import ListItemText from "@mui/material/ListItemText";
-import {Public, PublicOff} from "@mui/icons-material";
+import ReserveTopicSelect from "./ReserveTopicSelect";
const SubscriptionSettingsDialog = (props) => {
const { t } = useTranslation();
@@ -53,6 +49,8 @@ const SubscriptionSettingsDialog = (props) => {
if ((e instanceof UnauthorizedError)) {
session.resetAndRedirect(routes.login);
}
+
+ // FIXME handle 409
}
}
props.onClose();
@@ -80,7 +78,6 @@ const SubscriptionSettingsDialog = (props) => {
"aria-label": t("subscription_settings_dialog_display_name_placeholder")
}}
/>
-
{
checked={reserveTopicVisible}
onChange={(ev) => setReserveTopicVisible(ev.target.checked)}
inputProps={{
- "aria-label": t("xxxxxxxxxxxxxxxxxx")
+ "aria-label": t("subscription_settings_dialog_reserve_topic_label")
}}
/>
}
- label={t("Reserve topic and configure custom access:")}
+ label={t("subscription_settings_dialog_reserve_topic_label")}
/>
{reserveTopicVisible &&
-
-
-
+
}