diff --git a/react/admin-panel/src/AdminDashboard.jsx b/react/admin-panel/src/AdminDashboard.jsx index c428878..4c7391d 100644 --- a/react/admin-panel/src/AdminDashboard.jsx +++ b/react/admin-panel/src/AdminDashboard.jsx @@ -21,7 +21,7 @@ const LogView = lazy(() => import("./views/log-view")); const AccessControlList = lazy(() => import("./views/access-control-list")); const RouteListView = lazy(() => import("./views/route/route-list")); const RouteEditView = lazy(() => import("./views/route/route-edit")); -const SettingsView = lazy(() => import("./views/settings")); +const SettingsView = lazy(() => import("./views/settings/settings")); const ProfileView = lazy(() => import("./views/profile/profile")); export default function AdminDashboard(props) { diff --git a/react/admin-panel/src/elements/form-group.js b/react/admin-panel/src/elements/form-group.js new file mode 100644 index 0000000..3ab1588 --- /dev/null +++ b/react/admin-panel/src/elements/form-group.js @@ -0,0 +1,7 @@ +import {FormGroup, styled} from "@mui/material"; + +const SpacedFormGroup = styled(FormGroup)((props) => ({ + marginBottom: props.theme.spacing(2) +})); + +export default SpacedFormGroup; \ No newline at end of file diff --git a/react/admin-panel/src/views/profile/profile.js b/react/admin-panel/src/views/profile/profile.js index 70fc5f8..163c373 100644 --- a/react/admin-panel/src/views/profile/profile.js +++ b/react/admin-panel/src/views/profile/profile.js @@ -27,6 +27,7 @@ import MfaTotp from "./mfa-totp"; import MfaFido from "./mfa-fido"; import Dialog from "shared/elements/dialog"; import PasswordStrength from "shared/elements/password-strength"; +import SpacedFormGroup from "../../elements/form-group"; const GpgKeyField = styled(TextField)((props) => ({ "& > div": { @@ -46,10 +47,6 @@ const GpgFingerprintBox = styled(Box)((props) => ({ } })); -const ProfileFormGroup = styled(FormGroup)((props) => ({ - marginBottom: props.theme.spacing(2) -})); - const MFAOptions = styled(Box)((props) => ({ "& > div": { borderColor: props.theme.palette.divider, @@ -231,7 +228,7 @@ export default function ProfileView(props) {
- + {L("account.username")} setProfile({...profile, name: e.target.value })} /> - - + + {L("account.full_name")} setProfile({...profile, fullName: e.target.value })} /> - + setOpenedTab(openedTab === "password" ? "" : "password")} icon={}> - + {L("account.password_old")} setChangePassword({...changePassword, old: e.target.value })} /> - - + + {L("account.password_new")} setChangePassword({...changePassword, new: e.target.value })} /> - - + + {L("account.password_confirm")} setChangePassword({...changePassword, confirm: e.target.value })} /> - + @@ -303,7 +300,7 @@ export default function ProfileView(props) { {profile.gpgKey.fingerprint} - + {L("account.password")} - + : - + {L("account.gpg_key")} - +