diff --git a/src/components/Settings/SettingsUsers/index.tsx b/src/components/Settings/SettingsUsers/index.tsx index 5f17b33e..36fcaccd 100644 --- a/src/components/Settings/SettingsUsers/index.tsx +++ b/src/components/Settings/SettingsUsers/index.tsx @@ -3,7 +3,7 @@ import { Field, Form, Formik } from 'formik'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; -import useSWR from 'swr'; +import useSWR, { mutate } from 'swr'; import type { MainSettings } from '../../../../server/lib/settings'; import globalMessages from '../../../i18n/globalMessages'; import Button from '../../Common/Button'; @@ -80,6 +80,7 @@ const SettingsUsers: React.FC = () => { }, defaultPermissions: values.defaultPermissions, }); + mutate('/api/v1/settings/public'); addToast(intl.formatMessage(messages.toastSettingsSuccess), { autoDismiss: true, diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx index b4b8a022..ce38c529 100644 --- a/src/components/UserList/index.tsx +++ b/src/components/UserList/index.tsx @@ -58,7 +58,6 @@ const messages = defineMessages({ 'Are you sure you want to delete this user? All of their request data will be permanently removed.', localuser: 'Local User', createlocaluser: 'Create Local User', - createuser: 'Create User', creating: 'Creating…', create: 'Create', validationpasswordminchars: @@ -67,6 +66,7 @@ const messages = defineMessages({ usercreatedfailedexisting: 'The provided email address is already in use by another user.', usercreatedsuccess: 'User created successfully!', + displayName: 'Display Name', email: 'Email Address', password: 'Password', passwordinfodescription: @@ -294,6 +294,7 @@ const UserList: React.FC = () => { > { onSubmit={async (values) => { try { await axios.post('/api/v1/user', { + username: values.displayName, email: values.email, password: values.genpassword ? null : values.password, }); @@ -338,7 +340,7 @@ const UserList: React.FC = () => { }) => { return ( } onOk={() => handleSubmit()} okText={ @@ -371,9 +373,24 @@ const UserList: React.FC = () => { /> )}
+
+ +
+
+ +
+
+
@@ -417,6 +434,9 @@ const UserList: React.FC = () => { >
diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index f5a53089..3699d015 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -693,10 +693,10 @@ "components.UserList.create": "Create", "components.UserList.created": "Created", "components.UserList.createlocaluser": "Create Local User", - "components.UserList.createuser": "Create User", "components.UserList.creating": "Creating…", "components.UserList.deleteconfirm": "Are you sure you want to delete this user? All of their request data will be permanently removed.", "components.UserList.deleteuser": "Delete User", + "components.UserList.displayName": "Display Name", "components.UserList.edituser": "Edit User Permissions", "components.UserList.email": "Email Address", "components.UserList.importedfromplex": "{userCount, plural, one {# new user} other {# new users}} imported from Plex successfully!",