From 34ce9e1c2734a4dc1b364b76c7042839c9172aef Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 20 Nov 2020 20:49:05 +0800 Subject: ... --- FrontEnd/src/app/views/admin/UserAdmin.tsx | 50 +++++++++++++++++------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'FrontEnd/src/app/views/admin') diff --git a/FrontEnd/src/app/views/admin/UserAdmin.tsx b/FrontEnd/src/app/views/admin/UserAdmin.tsx index 8fd9b351..3cfd5880 100644 --- a/FrontEnd/src/app/views/admin/UserAdmin.tsx +++ b/FrontEnd/src/app/views/admin/UserAdmin.tsx @@ -15,7 +15,7 @@ import { kUserPermissionList, UserPermission, } from "@/http/user"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; interface DialogProps { open: boolean; @@ -33,13 +33,13 @@ const CreateUserDialog: React.FC> = ({ }) => { return ( @@ -70,12 +70,12 @@ const UserDeleteDialog: React.FC ( - <> - You are deleting user {username} ! - + + 0{username}2 + )} onProcess={() => getHttpUserClient().delete(username, token)} onSuccessAndClose={onSuccess} @@ -93,19 +93,26 @@ const UserModifyDialog: React.FC ( - <> - You are change the password of user - {oldUser.username} ! - + + 0{oldUser.username}2 + )} inputScheme={ [ - { type: "text", label: "New Username", initValue: oldUser.username }, - { type: "text", label: "New Password" }, - { type: "text", label: "New Nickname", initValue: oldUser.nickname }, + { + type: "text", + label: "admin:user.username", + initValue: oldUser.username, + }, + { type: "text", label: "admin:user.password" }, + { + type: "text", + label: "admin:user.nickname", + initValue: oldUser.nickname, + }, ] as const } onProcess={([username, password, nickname]) => @@ -139,13 +146,12 @@ const UserPermissionModifyDialog: React.FC ( - <> - You are modify permission of user - {username} ! - + + 0{username}2 + )} inputScheme={kUserPermissionList.map( (permission, index) => ({ -- cgit v1.2.3