From 4eb725d47a5e3212180d43cdb4ae3c67ad65cccd Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Fri, 8 Dec 2023 19:00:10 +0800 Subject: [PATCH] Improve image upload UI --- web/src/UserEditPage.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js index 9fcf299a..04b0d89d 100644 --- a/web/src/UserEditPage.js +++ b/web/src/UserEditPage.js @@ -374,12 +374,9 @@ class UserEditPage extends React.Component { {Setting.getLabel(i18next.t("general:Avatar"), i18next.t("general:Avatar - Tooltip"))} : - - {i18next.t("general:Preview")}: - - - {this.renderImage(this.state.user.avatar, i18next.t("user:Upload a photo"), i18next.t("user:Set new profile picture"), "avatar", false)} - + { + this.renderImage(this.state.user.avatar, i18next.t("user:Upload a photo"), i18next.t("user:Set new profile picture"), "avatar", false) + } ); } else if (accountItem.name === "User type") { @@ -550,9 +547,6 @@ class UserEditPage extends React.Component { - - {i18next.t("general:Preview")}: - { [ {name: "ID card front", value: "idCardFront"}, @@ -975,7 +969,7 @@ class UserEditPage extends React.Component { renderImage(imgUrl, title, set, tag, disabled) { return ( - + { imgUrl ?
@@ -986,7 +980,7 @@ class UserEditPage extends React.Component { :
+
-
{`Upload ${title}...`}
+
{`(${i18next.t("general:empty")})`}
} organization.name === this.state.organizationName)} />