Skip to content

Commit

Permalink
feat: user profile update
Browse files Browse the repository at this point in the history
Signed-off-by: neil <[email protected]>
  • Loading branch information
nanzm committed May 12, 2023
1 parent 240fdb6 commit 1c6713b
Show file tree
Hide file tree
Showing 32 changed files with 802 additions and 149 deletions.
6 changes: 5 additions & 1 deletion i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@
"signin": "Signin",
"subscribe": "My Subscribe",
"profile_setting": "Account Settings",
"signout": "SignOut"
"signout": "SignOut",
"btn": {
"save": "Save",
"cancel": "Cancel"
}
}
23 changes: 23 additions & 0 deletions i18n/en/setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"profile": {
"avatar": "Avatar",
"userinfo": "Profile",
"account_settings": "Account Settings",
"form": {
"name": "name",
"name_placeholder": "Please enter your name",
"email": "email",
"email_placeholder": "Please enter your email address",
"error_require": "{{field}} is a required field",
"error_name_max_len": "nickname cannot exceed {{length}} characters",
"error_email_format": "email format is incorrect"
},
"connected_accounts": "Connected Accounts",
"connected": "Connected",
"disconnect": "Disconnect",
"connect_multiple_accounts_to_your_user_and_sign_in": "Connect multiple accounts to your user and sign in with any of them",
"delete_account": "Delete account",
"delete_account_btn": "Delete account",
"delete_account_warning": " Once you delete your account, there is no going back. Please be certain when taking this action."
}
}
2 changes: 1 addition & 1 deletion i18n/en/submit_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"by_creating_an_account": "By creating an account, you agree to the",
"as_well_as": "as well as",
"terms_of_use": " Terms of Use ",
"non_active_account_processing_specification": " Non-active Account Processing Specification.",
"privacy_policy": " Non-active Account Processing Specification.",
"email_verification_successful": "Email verification successful",
"the_email_address": "The email address",
"has_been_successfully": "has been successfully bound to your OSS Compass account",
Expand Down
6 changes: 5 additions & 1 deletion i18n/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@
"ago": "",
"signin": "登录",
"profile_setting": "账号设置",
"signout": "退出"
"signout": "退出",
"btn": {
"save": "保存",
"cancel": "取消"
}
}
23 changes: 23 additions & 0 deletions i18n/zh/setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"profile": {
"avatar": "头像",
"userinfo": "用户信息",
"account_settings": "账号设置",
"form": {
"name": "昵称",
"name_placeholder": "请输入昵称",
"email": "邮箱",
"email_placeholder": "请输入邮箱地址",
"error_require": "{{field}}不能为空",
"error_name_max_len": "昵称长度不能超过{{length}}",
"error_email_format": "邮件格式不正确"
},
"connected_accounts": "第三方绑定",
"connected": "绑定",
"disconnect": "解绑",
"connect_multiple_accounts_to_your_user_and_sign_in": "绑定第三方账号,即可使用任何一个账户进行登录。",
"delete_account": "删除账号",
"delete_account_btn": "删除我的账号",
"delete_account_warning": "删除账户后,就无法进行撤销。在执行此操作时,请确保您已经仔细考虑过。"
}
}
2 changes: 1 addition & 1 deletion i18n/zh/submit_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"by_creating_an_account": "要创建一个帐户,您同意",
"as_well_as": "以及",
"terms_of_use": "使用条款",
"non_active_account_processing_specification": "非活跃帐户处理规范。",
"privacy_policy": "隐私协议",
"email_verification_successful": "邮件验证成功",
"the_email_address": "已成功将邮箱地址",
"has_been_successfully": "与您的 OSS Compass 帐户绑定",
Expand Down
1 change: 1 addition & 0 deletions src/common/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const buttonVariants = cva(
secondary: 'border border-black text-black font-bold hover:bg-gray-100',
danger:
'border-2 border-[#CC0000] text-[#CC0000] font-bold hover:bg-red-600/5',
text: '',
},
size: {
lg: 'text-base px-10 py-3',
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Header/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const User = () => {
const { t } = useTranslation();
const router = useRouter();
const mutation = useSignOutMutation(client);
const { user } = useSnapshot(userInfoStore);
const { providerUser: user } = useSnapshot(userInfoStore);

if (!user) {
return (
Expand Down
2 changes: 0 additions & 2 deletions src/common/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const Input = forwardRef<
value?: string;
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
defaultValue?: string;
className?: string;
placeholder?: string;
error?: boolean;
Expand All @@ -18,7 +17,6 @@ const Input = forwardRef<
const {
name,
className,
defaultValue,
value,
onChange,
onBlur,
Expand Down
Loading

0 comments on commit 1c6713b

Please sign in to comment.