From 363d473ce27a4d672110005f4dcde6576eb68ccc Mon Sep 17 00:00:00 2001
From: Anton Tananaev <anton@traccar.org>
Date: Thu, 28 Dec 2023 14:33:51 -0800
Subject: Add support link option

---
 modern/src/settings/components/SettingsMenu.jsx | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'modern/src/settings/components/SettingsMenu.jsx')

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>
-- 
cgit v1.2.3

