diff options
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/common/attributes/useServerAttributes.js | 4 | ||||
-rw-r--r-- | modern/src/resources/l10n/en.json | 1 | ||||
-rw-r--r-- | modern/src/settings/components/SettingsMenu.jsx | 9 |
3 files changed, 14 insertions, 0 deletions
diff --git a/modern/src/common/attributes/useServerAttributes.js b/modern/src/common/attributes/useServerAttributes.js index e724c2b0..a985ef40 100644 --- a/modern/src/common/attributes/useServerAttributes.js +++ b/modern/src/common/attributes/useServerAttributes.js @@ -1,6 +1,10 @@ import { useMemo } from 'react'; export default (t) => useMemo(() => ({ + support: { + name: t('settingsSupport'), + type: 'string', + }, title: { name: t('serverName'), type: 'string', diff --git a/modern/src/resources/l10n/en.json b/modern/src/resources/l10n/en.json index dc34efa0..2e92ba92 100644 --- a/modern/src/resources/l10n/en.json +++ b/modern/src/resources/l10n/en.json @@ -231,6 +231,7 @@ "settingsTotpForce": "Force One-time Password", "settingsServiceWorkerUpdateInterval": "ServiceWorker Update Interval", "settingsUpdateAvailable": "There is an update available.", + "settingsSupport": "Support", "reportTitle": "Reports", "reportScheduled": "Scheduled Reports", "reportDevice": "Device", diff --git a/modern/src/settings/components/SettingsMenu.jsx b/modern/src/settings/components/SettingsMenu.jsx index 96580974..0f3ebbe5 100644 --- a/modern/src/settings/components/SettingsMenu.jsx +++ b/modern/src/settings/components/SettingsMenu.jsx @@ -13,6 +13,7 @@ import PeopleIcon from '@mui/icons-material/People'; import TodayIcon from '@mui/icons-material/Today'; import PublishIcon from '@mui/icons-material/Publish'; import SmartphoneIcon from '@mui/icons-material/Smartphone'; +import HelpIcon from '@mui/icons-material/Help'; import { Link, useLocation } from 'react-router-dom'; import { useSelector } from 'react-redux'; import { useTranslation } from '../../common/components/LocalizationProvider'; @@ -38,6 +39,7 @@ const SettingsMenu = () => { const admin = useAdministrator(); const manager = useManager(); const userId = useSelector((state) => state.session.user.id); + const supportLink = useSelector((state) => state.session.server.attributes.support); const features = useFeatures(); @@ -122,6 +124,13 @@ const SettingsMenu = () => { icon={<PublishIcon />} selected={location.pathname.startsWith('/settings/command')} /> + {supportLink && ( + <MenuItem + title={t('settingsSupport')} + link={supportLink} + icon={<HelpIcon />} + /> + )} </> )} </List> |