Skip to content

Commit eae604f

Browse files
authored
Master merge into fui/master (#2750)
1 parent 0d9d55b commit eae604f

File tree

6 files changed

+105
-60
lines changed

6 files changed

+105
-60
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.history/
22
.vs/
33
.vscode/
4+
.idea/
5+
*.iml
46
.DS_Store
57
dist/
68
node_modules/

package-lock.json

Lines changed: 86 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"azure"
99
],
1010
"engines": {
11-
"node": ">=14.18.2"
11+
"node": ">=14.18.2 <21"
1212
},
1313
"scripts": {
1414
"start": "webpack-dev-server --open --config webpack.develop.js",
@@ -84,11 +84,11 @@
8484
"@monaco-editor/loader": "^1.3.3",
8585
"@monaco-editor/react": "^4.6.0",
8686
"@paperbits/azure": "^0.1.631",
87-
"@paperbits/common": "^0.1.631",
88-
"@paperbits/core": "^0.1.631",
89-
"@paperbits/forms": "^0.1.631",
87+
"@paperbits/common": "^0.1.632",
88+
"@paperbits/core": "^0.1.632",
89+
"@paperbits/forms": "^0.1.632",
9090
"@paperbits/react": "1.0.8",
91-
"@paperbits/styles": "^0.1.631",
91+
"@paperbits/styles": "^0.1.632",
9292
"@webcomponents/custom-elements": "1.6.0",
9393
"@webcomponents/shadydom": "^1.11.0",
9494
"client-oauth2": "4.3.3",

src/admin/rightPanel.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,20 @@ export class RightPanel extends React.Component<{}, RightPanelState> {
9898
componentDidMount(): void {
9999
this.eventManager.addEventListener('onDataChange', this.onDataChange.bind(this));
100100
window.addEventListener('resize', this.checkScreenSize.bind(this));
101+
this.router.addRouteChangeListener(() => this.getPageName());
102+
this.getPageName();
101103
this.checkScreenSize();
102104
this.getRoles();
103105
}
104106

105-
componentDidUpdate(prevProps: Readonly<{}>, prevState: Readonly<RightPanelState>, snapshot?: any): void {
106-
if (this.state.isFocusedState && !prevState.isFocusedState) {
107+
componentWillUnmount() {
108+
this.eventManager.removeEventListener('onDataChange', this.onDataChange.bind(this));
109+
window.removeEventListener('resize', this.checkScreenSize.bind(this));
110+
this.router.removeRouteChangeListener(() => this.getPageName());
111+
}
112+
113+
setPageName = () => {
114+
if (this.state.isFocusedState) {
107115
const host = this.viewManager.getHost();
108116
if (host.name === HostNames.Page) {
109117
this.getPageName();
@@ -115,11 +123,6 @@ export class RightPanel extends React.Component<{}, RightPanelState> {
115123
}
116124
}
117125

118-
componentWillUnmount() {
119-
this.eventManager.removeEventListener('onDataChange', this.onDataChange.bind(this));
120-
window.removeEventListener('resize', this.checkScreenSize.bind(this));
121-
}
122-
123126
getRoles = async (): Promise<void> => {
124127
const roles = await this.roleService.getRoles();
125128

src/components/users/change-password/ko/runtime/change-password.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export class ChangePassword {
5555

5656
this.password.extend(<any>{ required: { message: ValidationMessages.passwordRequired } }); // TODO: password requirements should come from Management API.
5757
this.newPassword.extend(<any>{ required: { message: ValidationMessages.newPasswordRequired }, minLength: 8 }); // TODO: password requirements should come from Management API.
58+
this.newPassword.extend(<any>{ notEqual: { message: ValidationMessages.newPasswordMustBeDifferent, params: this.password } });
5859
this.passwordConfirmation.extend(<any>{ equal: { message: ValidationMessages.passwordConfirmationMustMatch, params: this.newPassword } });
5960
this.captcha.extend(<any>{ required: { message: ValidationMessages.captchaRequired } });
6061
}

src/components/users/validationMessages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export class ValidationMessages {
77
static passwordRequired = `Password is required.`;
88
static passwordConfirmationMustMatch = `Password confirmation field must be equal to password.`;
99
static newPasswordRequired = `New password is required.`;
10+
static newPasswordMustBeDifferent = `New password must be different from your old password.`;
1011
static consentRequired = `You must agree to the terms of use.`;
1112
static subscriptionNameRequired = `Subscription name is required.`;
1213
}

0 commit comments

Comments
 (0)