Skip to content

Commit 846d00f

Browse files
kevinmlsilvasonartech
authored andcommitted
SONAR-21566 - Change password after first login adopts new MIUI
1 parent dad225e commit 846d00f

2 files changed

Lines changed: 31 additions & 21 deletions

File tree

server/sonar-web/src/main/js/app/components/ResetPassword.tsx

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
* along with this program; if not, write to the Free Software Foundation,
1818
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
20+
import {
21+
FlagMessage,
22+
LargeCenteredLayout,
23+
PageContentFontWrapper,
24+
SubHeading,
25+
Title,
26+
} from 'design-system';
2027
import * as React from 'react';
2128
import { Helmet } from 'react-helmet-async';
2229
import ResetPasswordForm from '../../components/common/ResetPasswordForm';
@@ -29,29 +36,29 @@ export interface ResetPasswordProps {
2936
currentUser: LoggedInUser;
3037
}
3138

32-
export function ResetPassword({ currentUser }: ResetPasswordProps) {
39+
export function ResetPassword({ currentUser }: Readonly<ResetPasswordProps>) {
3340
return (
34-
<div className="page-wrapper-simple">
35-
<Helmet defer={false} title={translate('my_account.reset_password.page')} />
36-
<div className="page-simple">
37-
<h1 className="text-center huge">{translate('my_account.reset_password')}</h1>
38-
<p className="text-center huge-spacer-top huge-spacer-bottom">
39-
{translate('my_account.reset_password.explain')}
40-
</p>
41-
42-
<div className="text-center">
43-
<h2 className="big-spacer-bottom big">{translate('my_profile.password.title')}</h2>
44-
45-
<ResetPasswordForm
46-
user={currentUser}
47-
onPasswordChange={() => {
48-
// Force a refresh for the backend to handle additional redirects.
49-
window.location.href = `${getBaseUrl()}/`;
50-
}}
51-
/>
41+
<LargeCenteredLayout>
42+
<PageContentFontWrapper className="sw-body-sm">
43+
<Helmet defer={false} title={translate('my_account.reset_password.page')} />
44+
<div className="sw-flex sw-justify-center sw-mt-10">
45+
<div>
46+
<Title>{translate('my_account.reset_password')}</Title>
47+
<FlagMessage variant="warning" className="sw-mb-4">
48+
{translate('my_account.reset_password.explain')}
49+
</FlagMessage>
50+
<SubHeading>{translate('my_profile.password.title')}</SubHeading>
51+
<ResetPasswordForm
52+
user={currentUser}
53+
onPasswordChange={() => {
54+
// Force a refresh for the backend to handle additional redirects.
55+
window.location.href = `${getBaseUrl()}/`;
56+
}}
57+
/>
58+
</div>
5259
</div>
53-
</div>
54-
</div>
60+
</PageContentFontWrapper>
61+
</LargeCenteredLayout>
5562
);
5663
}
5764

server/sonar-web/src/main/js/components/common/ResetPasswordForm.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export default function ResetPasswordForm({
9191
<div className="sw-pb-4">
9292
<FormField htmlFor="old_password" label={translate('my_profile.password.old')} required>
9393
<InputField
94+
size="large"
9495
autoComplete="off"
9596
id="old_password"
9697
name="old_password"
@@ -105,6 +106,7 @@ export default function ResetPasswordForm({
105106
<div className="sw-pb-4">
106107
<FormField htmlFor="password" label={translate('my_profile.password.new')} required>
107108
<InputField
109+
size="large"
108110
autoComplete="off"
109111
id="password"
110112
name="password"
@@ -123,6 +125,7 @@ export default function ResetPasswordForm({
123125
required
124126
>
125127
<InputField
128+
size="large"
126129
autoComplete="off"
127130
id="password_confirmation"
128131
name="password_confirmation"

0 commit comments

Comments
 (0)