diff options
author | crupest <crupest@outlook.com> | 2020-11-04 12:29:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 12:29:55 +0800 |
commit | 1e9e5eb89099ffaa454635fdd7271cece757fb2d (patch) | |
tree | 1f19646ac27a3dcd4680e871f34218b85b0915d8 /FrontEnd/src/app/views/admin/UserAdmin.tsx | |
parent | f3503b399ff7b65f363beca313c8a0c336884bec (diff) | |
parent | 1ba32f233677cad56636462b1f6552ff6e800801 (diff) | |
download | timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.tar.gz timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.tar.bz2 timeline-1e9e5eb89099ffaa454635fdd7271cece757fb2d.zip |
Merge pull request #165 from crupest/timeline
Redesign timeline ui.
Diffstat (limited to 'FrontEnd/src/app/views/admin/UserAdmin.tsx')
-rw-r--r-- | FrontEnd/src/app/views/admin/UserAdmin.tsx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/FrontEnd/src/app/views/admin/UserAdmin.tsx b/FrontEnd/src/app/views/admin/UserAdmin.tsx index 18b77ca8..0f5f8796 100644 --- a/FrontEnd/src/app/views/admin/UserAdmin.tsx +++ b/FrontEnd/src/app/views/admin/UserAdmin.tsx @@ -152,16 +152,18 @@ const CreateUserDialog: React.FC<CreateUserDialogProps> = (props) => { title="Create" titleColor="create" inputPrompt="You are creating a new user." - inputScheme={[ - { type: "text", label: "Username" }, - { type: "text", label: "Password" }, - { type: "bool", label: "Administrator" }, - ]} + inputScheme={ + [ + { type: "text", label: "Username" }, + { type: "text", label: "Password" }, + { type: "bool", label: "Administrator" }, + ] as const + } onProcess={([username, password, administrator]) => props.process({ - username: username as string, - password: password as string, - administrator: administrator as boolean, + username: username, + password: password, + administrator: administrator, }) } close={props.close} @@ -221,7 +223,7 @@ const UserChangeUsernameDialog: React.FC<UserModifyDialogProps<string>> = ( )} inputScheme={[{ type: "text", label: "New Username" }]} onProcess={([newUsername]) => { - return props.process(newUsername as string); + return props.process(newUsername); }} /> ); @@ -245,7 +247,7 @@ const UserChangePasswordDialog: React.FC<UserModifyDialogProps<string>> = ( )} inputScheme={[{ type: "text", label: "New Password" }]} onProcess={([newPassword]) => { - return props.process(newPassword as string); + return props.process(newPassword); }} /> ); |