Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd088bfb

Browse files
committed
fix(site): allow user to update their name
1 parent1131772 commitd088bfb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎site/src/pages/UserSettingsPage/AccountPage/AccountForm.stories.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const Loading: Story = {
2626
isLoading:true,
2727
},
2828
};
29+
2930
exportconstWithError:Story={
3031
args:{
3132
updateProfileError:mockApiError({
@@ -42,3 +43,9 @@ export const WithError: Story = {
4243
},
4344
},
4445
};
46+
47+
exportconstEditable:Story={
48+
args:{
49+
editable:true,
50+
},
51+
};

‎site/src/pages/UserSettingsPage/AccountPage/AccountForm.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const Language = {
2121

2222
constvalidationSchema=Yup.object({
2323
username:nameValidator(Language.usernameLabel),
24+
name:Yup.string(),
2425
});
2526

2627
exportinterfaceAccountFormProps{
@@ -75,13 +76,11 @@ export const AccountForm: FC<AccountFormProps> = ({
7576
/>
7677
<TextField
7778
{...getFieldHelpers("name")}
79+
fullWidth
7880
onBlur={(e)=>{
7981
e.target.value=e.target.value.trim();
8082
form.handleChange(e);
8183
}}
82-
aria-disabled={!editable}
83-
disabled={!editable}
84-
fullWidth
8584
label={Language.nameLabel}
8685
helperText='The human-readable name is optional and can be accessed in a template via the "data.coder_workspace_owner.me.full_name" property.'
8786
/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp