Fix user profile page UI

This commit is contained in:
Yang Luo
2024-01-20 19:28:43 +08:00
parent 97c7f2631a
commit f4c873ffe6
25 changed files with 42 additions and 55 deletions

View File

@ -368,7 +368,11 @@ class App extends Component {
if (this.state.account === undefined) {
return null;
} else if (this.state.account === null) {
return null;
return (
<React.Fragment>
<LanguageSelect />
</React.Fragment>
);
} else {
return (
<React.Fragment>

View File

@ -991,12 +991,14 @@ class UserEditPage extends React.Component {
renderUser() {
return (
<Card size="small" title={
(this.props.account === null) ? i18next.t("user:User Profile") : (
<div>
{this.state.mode === "add" ? i18next.t("user:New User") : i18next.t("user:Edit User")}&nbsp;&nbsp;&nbsp;&nbsp;
<Button onClick={() => this.submitUserEdit(false)}>{i18next.t("general:Save")}</Button>
<Button style={{marginLeft: "20px"}} type="primary" onClick={() => this.submitUserEdit(true)}>{i18next.t("general:Save & Exit")}</Button>
{this.state.mode === "add" ? <Button style={{marginLeft: "20px"}} onClick={() => this.deleteUser()}>{i18next.t("general:Cancel")}</Button> : null}
</div>
)
} style={(Setting.isMobile()) ? {margin: "5px"} : {}} type="inner">
{
this.getUserOrganization()?.accountItems?.map(accountItem => {
@ -1054,7 +1056,11 @@ class UserEditPage extends React.Component {
if (userListUrl !== null) {
this.props.history.push(userListUrl);
} else {
if (Setting.isLocalAdminUser(this.props.account)) {
this.props.history.push("/users");
} else {
this.props.history.push("/");
}
}
} else {
this.props.history.push(`/users/${this.state.user.owner}/${this.state.user.name}`);
@ -1111,7 +1117,7 @@ class UserEditPage extends React.Component {
)
}
{
this.state.user === null ? null :
(this.state.user === null || this.props.account === null) ? null :
<div style={{marginTop: "20px", marginLeft: "40px"}}>
<Button size="large" onClick={() => this.submitUserEdit(false)}>{i18next.t("general:Save")}</Button>
<Button style={{marginLeft: "20px"}} type="primary" size="large" onClick={() => this.submitUserEdit(true)}>{i18next.t("general:Save & Exit")}</Button>

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Links",
"Logged in successfully": "Erfolgreich eingeloggt",
"Logged out successfully": "Erfolgreich ausgeloggt",
@ -192,7 +191,6 @@
"Close": "Schließen",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Erstellte Zeit",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Lade ein Foto hoch",
"User Profile": "User Profile",
"Values": "Werte",
"Verification code sent": "Bestätigungscode gesendet",
"WebAuthn credentials": "WebAuthn-Anmeldeinformationen",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Izquierda",
"Logged in successfully": "Acceso satisfactorio",
"Logged out successfully": "Cerró sesión exitosamente",
@ -192,7 +191,6 @@
"Close": "Cerca",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Tiempo creado",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Subir una foto",
"User Profile": "User Profile",
"Values": "Valores",
"Verification code sent": "Código de verificación enviado",
"WebAuthn credentials": "Credenciales de WebAuthn",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incrémentale",
"Input": "Saisie",
"Invitation code": "Code d'invitation",
"Invitation code - Tooltip": "Code d'invitation - infobulle",
"Left": "Gauche",
"Logged in successfully": "Connexion réussie",
"Logged out successfully": "Déconnexion réussie",
@ -192,7 +191,6 @@
"Close": "Fermer",
"Confirm": "Confirmer",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copier",
"Created time": "Date de création",
"Custom": "Personnalisée",
"Dashboard": "Tableau de bord",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Télécharger une photo de l'endroit de la pièce d'identité",
"Upload ID card with person picture": "Télécharger une photo la pièce d'identité avec une personne",
"Upload a photo": "Télécharger une photo",
"User Profile": "User Profile",
"Values": "Valeurs",
"Verification code sent": "Code de vérification envoyé",
"WebAuthn credentials": "Identifiants WebAuthn",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Kiri",
"Logged in successfully": "Berhasil masuk",
"Logged out successfully": "Berhasil keluar dari sistem",
@ -192,7 +191,6 @@
"Close": "Tutup",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Waktu dibuat",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Unggah foto",
"User Profile": "User Profile",
"Values": "Nilai-nilai",
"Verification code sent": "Kode verifikasi telah dikirim",
"WebAuthn credentials": "Kredensial WebAuthn",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "左",
"Logged in successfully": "正常にログインしました",
"Logged out successfully": "正常にログアウトしました",
@ -192,7 +191,6 @@
"Close": "閉じる",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "作成された時間",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "写真をアップロードしてください",
"User Profile": "User Profile",
"Values": "価値観",
"Verification code sent": "確認コードを送信しました",
"WebAuthn credentials": "WebAuthnの資格情報",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "왼쪽",
"Logged in successfully": "성공적으로 로그인했습니다",
"Logged out successfully": "로그아웃이 성공적으로 되었습니다",
@ -192,7 +191,6 @@
"Close": "닫다",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "작성한 시간",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "사진을 업로드하세요",
"User Profile": "User Profile",
"Values": "가치들",
"Verification code sent": "인증 코드가 전송되었습니다",
"WebAuthn credentials": "웹 인증 자격증명",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Código de convite",
"Invitation code - Tooltip": "Código de convite - Tooltip",
"Left": "Esquerda",
"Logged in successfully": "Login realizado com sucesso",
"Logged out successfully": "Logout realizado com sucesso",
@ -192,7 +191,6 @@
"Close": "Fechar",
"Confirm": "Confirmar",
"Copied to clipboard successfully": "Copiado para a área de transferência com sucesso",
"Copy": "Copiar",
"Created time": "Hora de Criação",
"Custom": "Personalizar",
"Dashboard": "Painel",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Enviar uma foto",
"User Profile": "User Profile",
"Values": "Valores",
"Verification code sent": "Código de verificação enviado",
"WebAuthn credentials": "Credenciais WebAuthn",

View File

@ -61,7 +61,6 @@
"Incremental": "Последовательный",
"Input": "Input",
"Invitation code": "Код приглашения",
"Invitation code - Tooltip": "Код приглашения",
"Left": "Левый",
"Logged in successfully": "Успешный вход в систему",
"Logged out successfully": "Успешный выход из системы",
@ -192,7 +191,6 @@
"Close": "Близко",
"Confirm": "Подтвердить",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Копировать",
"Created time": "Созданное время",
"Custom": "Custom",
"Dashboard": "Панель мониторинга",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Загрузить фото",
"User Profile": "User Profile",
"Values": "Значения",
"Verification code sent": "Код подтверждения отправлен",
"WebAuthn credentials": "WebAuthn удостоверения",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Davet Kodu",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Sol",
"Logged in successfully": "Başarıyla giriş yapıldı",
"Logged out successfully": "Başarıyla çıkış yapıldı",
@ -192,7 +191,6 @@
"Close": "Kapat",
"Confirm": "Onayla",
"Copied to clipboard successfully": "Başarıyla kopyalandı",
"Copy": "Kopyala",
"Created time": "Oluşturma zamanı",
"Custom": "Özel",
"Dashboard": "Gösterge Paneli",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Incremental",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Left",
"Logged in successfully": "Logged in successfully",
"Logged out successfully": "Logged out successfully",
@ -192,7 +191,6 @@
"Close": "Close",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Created time",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Upload a photo",
"User Profile": "User Profile",
"Values": "Values",
"Verification code sent": "Verification code sent",
"WebAuthn credentials": "WebAuthn credentials",

View File

@ -61,7 +61,6 @@
"Incremental": "Tăng",
"Input": "Input",
"Invitation code": "Invitation code",
"Invitation code - Tooltip": "Invitation code - Tooltip",
"Left": "Trái",
"Logged in successfully": "Đăng nhập thành công",
"Logged out successfully": "Đã đăng xuất thành công",
@ -192,7 +191,6 @@
"Close": "Đóng lại",
"Confirm": "Confirm",
"Copied to clipboard successfully": "Copied to clipboard successfully",
"Copy": "Copy",
"Created time": "Thời gian tạo",
"Custom": "Custom",
"Dashboard": "Dashboard",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "Upload ID card front picture",
"Upload ID card with person picture": "Upload ID card with person picture",
"Upload a photo": "Tải lên một bức ảnh",
"User Profile": "User Profile",
"Values": "Giá trị",
"Verification code sent": "Mã xác minh đã được gửi",
"WebAuthn credentials": "Chứng chỉ WebAuthn",

View File

@ -61,7 +61,6 @@
"Incremental": "递增",
"Input": "输入",
"Invitation code": "邀请码",
"Invitation code - Tooltip": "注册时填写的邀请码",
"Left": "居左",
"Logged in successfully": "登录成功",
"Logged out successfully": "登出成功",
@ -192,7 +191,6 @@
"Close": "关闭",
"Confirm": "确认",
"Copied to clipboard successfully": "已成功复制到剪贴板",
"Copy": "复制",
"Created time": "创建时间",
"Custom": "自定义",
"Dashboard": "数据看板",
@ -1092,6 +1090,7 @@
"Upload ID card front picture": "上传身份证正面照片",
"Upload ID card with person picture": "上传手持身份证照片",
"Upload a photo": "上传头像",
"User Profile": "用户个人页",
"Values": "值",
"Verification code sent": "验证码已发送",
"WebAuthn credentials": "WebAuthn凭据",