Add server name to background notification setting

pull/788/head
nimbleghost 2023-06-28 08:44:05 +02:00
parent d294a692d2
commit dabb6a481f
2 changed files with 3 additions and 3 deletions

View File

@ -335,7 +335,7 @@
"prefs_notifications_web_push_title": "Background notifications",
"prefs_notifications_web_push_enabled_description": "Notifications are received even when web app is not running (via Web Push)",
"prefs_notifications_web_push_disabled_description": "Notification are received when web app is running (via WebSocket)",
"prefs_notifications_web_push_enabled": "Enabled",
"prefs_notifications_web_push_enabled": "Enabled for {{server}}",
"prefs_notifications_web_push_disabled": "Disabled",
"prefs_users_title": "Manage users",
"prefs_users_description": "Add/remove users for your protected topics here. Please note that username and password are stored in the browser's local storage.",

View File

@ -36,7 +36,7 @@ import { Info } from "@mui/icons-material";
import { useOutletContext } from "react-router-dom";
import theme from "./theme";
import userManager from "../app/UserManager";
import { playSound, shuffle, sounds, validUrl } from "../app/utils";
import { playSound, shortUrl, shuffle, sounds, validUrl } from "../app/utils";
import session from "../app/Session";
import routes from "./routes";
import accountApi, { Permission, Role } from "../app/AccountApi";
@ -253,7 +253,7 @@ const WebPushEnabled = () => {
>
<FormControl fullWidth variant="standard" sx={{ m: 1 }}>
<Select value={enabled ?? false} onChange={handleChange} aria-labelledby={labelId}>
<MenuItem value>{t("prefs_notifications_web_push_enabled")}</MenuItem>
<MenuItem value>{t("prefs_notifications_web_push_enabled", { server: shortUrl(config.base_url) })}</MenuItem>
<MenuItem value={false}>{t("prefs_notifications_web_push_disabled")}</MenuItem>
</Select>
</FormControl>