aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/GroupConnectionsPage.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/GroupConnectionsPage.jsx')
-rw-r--r--modern/src/settings/GroupConnectionsPage.jsx37
1 files changed, 14 insertions, 23 deletions
diff --git a/modern/src/settings/GroupConnectionsPage.jsx b/modern/src/settings/GroupConnectionsPage.jsx
index 8ea3b88e..980bd9da 100644
--- a/modern/src/settings/GroupConnectionsPage.jsx
+++ b/modern/src/settings/GroupConnectionsPage.jsx
@@ -7,7 +7,6 @@ import {
Typography,
Container,
} from '@mui/material';
-import makeStyles from '@mui/styles/makeStyles';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import LinkField from '../common/components/LinkField';
import { useTranslation } from '../common/components/LocalizationProvider';
@@ -15,21 +14,10 @@ import SettingsMenu from './components/SettingsMenu';
import { formatNotificationTitle } from '../common/util/formatter';
import PageLayout from '../common/components/PageLayout';
import useFeatures from '../common/util/useFeatures';
-
-const useStyles = makeStyles((theme) => ({
- container: {
- marginTop: theme.spacing(2),
- },
- details: {
- display: 'flex',
- flexDirection: 'column',
- gap: theme.spacing(2),
- paddingBottom: theme.spacing(3),
- },
-}));
+import useSettingsStyles from './common/useSettingsStyles';
const GroupConnectionsPage = () => {
- const classes = useStyles();
+ const classes = useSettingsStyles();
const t = useTranslation();
const { id } = useParams();
@@ -73,6 +61,7 @@ const GroupConnectionsPage = () => {
baseId={id}
keyBase="groupId"
keyLink="driverId"
+ titleGetter={(it) => `${it.name} (${it.uniqueId})`}
label={t('sharedDrivers')}
/>
)}
@@ -87,15 +76,17 @@ const GroupConnectionsPage = () => {
label={t('sharedComputedAttributes')}
/>
)}
- <LinkField
- endpointAll="/api/commands"
- endpointLinked={`/api/commands?groupId=${id}`}
- baseId={id}
- keyBase="groupId"
- keyLink="commandId"
- titleGetter={(it) => it.description}
- label={t('sharedSavedCommands')}
- />
+ {!features.disableSavedCommands && (
+ <LinkField
+ endpointAll="/api/commands"
+ endpointLinked={`/api/commands?groupId=${id}`}
+ baseId={id}
+ keyBase="groupId"
+ keyLink="commandId"
+ titleGetter={(it) => it.description}
+ label={t('sharedSavedCommands')}
+ />
+ )}
{!features.disableMaintenance && (
<LinkField
endpointAll="/api/maintenance"