diff --git a/react/admin-panel/src/elements/sidebar.js b/react/admin-panel/src/elements/sidebar.js index 644364e..e7e5763 100644 --- a/react/admin-panel/src/elements/sidebar.js +++ b/react/admin-panel/src/elements/sidebar.js @@ -5,7 +5,7 @@ import { Box, CssBaseline, Divider, IconButton, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Select, Drawer, - styled, MenuItem, Menu, + styled, MenuItem, Menu, useTheme, } from "@mui/material"; import { Dropdown } from '@mui/base/Dropdown'; import ChevronRightIcon from '@mui/icons-material/ChevronRight'; @@ -100,6 +100,7 @@ export default function Sidebar(props) { const [fetchLanguages, setFetchLanguages] = useState(true); const [drawerOpen, setDrawerOpen] = useState(window.screen.width >= 1000); const [anchorEl, setAnchorEl] = useState(null); + const theme = useTheme(); const navigate = useNavigate(); const currentPath = useCurrentPath(); diff --git a/react/admin-panel/src/views/access-control-list.js b/react/admin-panel/src/views/access-control-list.js index 2d59427..84acd80 100644 --- a/react/admin-panel/src/views/access-control-list.js +++ b/react/admin-panel/src/views/access-control-list.js @@ -159,9 +159,9 @@ export default function AccessControlList(props) { rows.push( -
-
- + + setDialogData({ open: true, @@ -172,25 +172,25 @@ export default function AccessControlList(props) { { type: "label", value: L("permissions.description") + ":" }, { type: "text", name: "description", value: permission.description, maxLength: 128 } ], - onOption: (option, inputData) => option === 0 ? onUpdatePermission(inputData, permission.groups) : true })} > + onOption: (option, inputData) => option === 1 ? onUpdatePermission(inputData, permission.groups) : true })} > - setDialogData({ open: true, title: L("permissions.delete_permission_confirm"), message: L("permissions.method") + ": " + permission.method, - onOption: (option) => option === 0 ? onDeletePermission(permission.method) : true + onOption: (option) => option === 1 ? onDeletePermission(permission.method) : true })} > -
-
+ + {permission.method}
{permission.description} -
-
+ +
option === 0 ? onUpdatePermission(inputData, []) : true + onOption: (option, inputData) => option === 1 ? onUpdatePermission(inputData, []) : true })}> {L("general.add")} @@ -279,6 +279,6 @@ export default function AccessControlList(props) { message={dialogData.message} onOption={dialogData.onOption} inputs={dialogData.inputs} - options={[L("general.ok"), L("general.cancel")]}/> + options={[L("general.cancel"), L("general.ok")]}/> } \ No newline at end of file diff --git a/react/admin-panel/src/views/group/group-edit.js b/react/admin-panel/src/views/group/group-edit.js index 1f05321..e3ebcd0 100644 --- a/react/admin-panel/src/views/group/group-edit.js +++ b/react/admin-panel/src/views/group/group-edit.js @@ -159,9 +159,9 @@ export default function EditGroupView(props) { } ], onOption: (option) => { - if(option === 0) { + if(option === 1) { onAddMember() - } else { + } else { selectedUserRef.current = null } } @@ -227,12 +227,12 @@ export default function EditGroupView(props) { { !isNewGroup && @@ -262,12 +262,12 @@ export default function EditGroupView(props) { label: L("general.remove"), element: Delete, disabled: !api.hasPermission("groups/removeMember"), - color: "secondary", + color: "error", onClick: (entry) => setDialogData({ open: true, title: L("account.remove_group_member_title"), message: sprintf(L("account.remove_group_member_text"), entry.fullName || entry.name), - onOption: (option) => option === 0 ? onRemoveMember(entry.id) : true + onOption: (option) => option === 1 ? onRemoveMember(entry.id) : true }) } ]), @@ -293,6 +293,6 @@ export default function EditGroupView(props) { message={dialogData.message} onOption={dialogData.onOption} inputs={dialogData.inputs} - options={[L("general.ok"), L("general.cancel")]} /> + options={[L("general.cancel"), L("general.ok")]} /> } \ No newline at end of file diff --git a/react/admin-panel/src/views/overview.js b/react/admin-panel/src/views/overview.js index 5d54ab4..dd6c9c1 100644 --- a/react/admin-panel/src/views/overview.js +++ b/react/admin-panel/src/views/overview.js @@ -76,12 +76,12 @@ const StatBox = (props) => { const {enabled, text, ...other} = props; if (enabled) { - return + return {text} } else { - return - {text} + return + {text} } } @@ -127,25 +127,25 @@ export default function Overview(props) { Home ]}> - + } link={"/admin/users"}/> - + } link={"/admin/groups"}/> - + } link={"/admin/routes"}/> - + } diff --git a/react/admin-panel/src/views/profile/edit-picture.js b/react/admin-panel/src/views/profile/edit-picture.js index 06f302d..add3b3c 100644 --- a/react/admin-panel/src/views/profile/edit-picture.js +++ b/react/admin-panel/src/views/profile/edit-picture.js @@ -76,7 +76,7 @@ export default function EditProfilePicture(props) { }, ], onOption: (option) => { - if (option === 0 && file) { + if (option === 1 && file) { onUploadPicture(file) } @@ -115,13 +115,13 @@ export default function EditProfilePicture(props) { {profile.profilePicture && diff --git a/react/admin-panel/src/views/profile/gpg-box.js b/react/admin-panel/src/views/profile/gpg-box.js index fda0369..9a3462c 100644 --- a/react/admin-panel/src/views/profile/gpg-box.js +++ b/react/admin-panel/src/views/profile/gpg-box.js @@ -106,7 +106,7 @@ export default function GpgBox(props) { { profile.gpgKey.confirmed ? : - + } GPG-Fingerprint: navigator.clipboard.writeText(profile.gpgKey.fingerprint)}> @@ -124,7 +124,7 @@ export default function GpgBox(props) { -