Skip to content

Commit ec50b8d

Browse files
authored
Merge pull request #1 from topcoder-platform/develop
latest
2 parents 8089234 + dde10aa commit ec50b8d

File tree

11 files changed

+45
-15
lines changed

11 files changed

+45
-15
lines changed

src/server/routes/mailchimp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const routes = express.Router();
1111
routes.use((req, res, next) => {
1212
res.set('Access-Control-Allow-Origin', '*');
1313
res.set('Access-Control-Allow-Headers', 'authorization, content-type');
14+
res.set('Access-Control-Allow-Methods', 'GET,POST,PUT,OPTIONS');
1415
next();
1516
});
1617

src/shared/components/Settings/Account/LinkedAccount/AddWebLink.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ export default class AddWebLink extends React.Component {
7070
isWebLinkValid() {
7171
const { webLink } = this.state;
7272
return !webLink
73-
|| (webLink.includes('www') && /^(http(s?):\/\/)?(www\.)[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,15})+$/.test(webLink)) /* eslint-disable-line no-useless-escape */
74-
|| (!webLink.includes('www') && /^(http(s?):\/\/)?[a-zA-Z0-9\.\-\_]+(\.[a-zA-Z]{2,15})+$/.test(webLink)); /* eslint-disable-line no-useless-escape */
73+
|| /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(webLink); /* eslint-disable-line no-useless-escape */
7574
}
7675

7776
webLinkExist() {

src/shared/components/Settings/Account/LinkedAccount/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default class LinkedAccount extends React.Component {
179179
<div styleName={containerStyle}>
180180
<div styleName="linked-account-container">
181181
<h1>
182-
Linked Account
182+
Linked Accounts
183183
</h1>
184184
<div styleName="sub-title">
185185
Your linked accounts

src/shared/components/Settings/Account/MyAccount/index.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,19 @@ export default class MyAccount extends React.Component {
6565
}
6666

6767
componentDidMount() {
68-
const { profile } = this.props;
68+
const { profile, loadTabData } = this.props;
6969
const currentEmail = profile.email;
7070
this.setState({ currentEmail });
7171
this.updatePredicate();
7272
window.addEventListener('resize', this.updatePredicate);
73+
loadTabData(this.props);
7374
}
7475

7576
componentWillReceiveProps(nextProps) {
76-
const {
77-
profileState,
78-
} = this.props;
77+
const { profileState, profile } = this.props;
78+
if (profile.email !== nextProps.profile.email) {
79+
this.setState({ currentEmail: nextProps.profile.email });
80+
}
7981
if (profileState.updatingPassword
8082
&& !nextProps.profileState.updatingPassword
8183
&& !nextProps.settingsPageState.incorrectPassword
@@ -462,7 +464,7 @@ export default class MyAccount extends React.Component {
462464
</div>
463465
</div>
464466

465-
<div styleName="row">
467+
<div styleName="row button-group">
466468
<div styleName={`button-change-email ${btnChangeEmailVisible ? 'active' : 'hide'}`}>
467469
<PrimaryButton
468470
styleName="white-label"
@@ -676,4 +678,5 @@ MyAccount.propTypes = {
676678
updatePassword: PT.func.isRequired,
677679
updateProfile: PT.func.isRequired,
678680
clearIncorrectPassword: PT.func.isRequired,
681+
loadTabData: PT.func.isRequired,
679682
};

src/shared/components/Settings/Account/MyAccount/styles.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@
155155
align-content: space-between;
156156
justify-content: flex-start;
157157

158+
&.button-group {
159+
justify-content: space-evenly;
160+
}
161+
158162
.field {
159163
@include upto-sm {
160164
display: block;
@@ -374,9 +378,6 @@
374378
}
375379

376380
.button-cancel-change-email {
377-
margin-left: auto;
378-
margin-right: auto;
379-
380381
button,
381382
a {
382383
@include roboto-medium;
@@ -404,9 +405,6 @@
404405
}
405406

406407
.button-verification-email {
407-
margin-left: auto;
408-
margin-right: auto;
409-
410408
button,
411409
a {
412410
@include roboto-medium;

src/shared/components/Settings/Profile/Skills/index.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,16 @@ export default class Skills extends ConsentComponent {
366366
const currentTab = settingsUI.currentProfileTab;
367367
const containerStyle = currentTab === tabs.SKILL ? '' : 'hide';
368368
// All lookup skills
369-
const lookupSkills = lookupData.skillTags ? _.sortBy(lookupData.skillTags, s => s.name) : [];
369+
const allSkills = lookupData.skillTags ? lookupData.skillTags : [];
370370
const buttons = userSkills.slice(0, totalPage);
371371
const list = isMobileView ? indexList : userSkills;
372372

373+
// filter out already added skills
374+
const lookupSkills = _.sortBy(
375+
_.filter(allSkills, skill => _.findIndex(userSkills, l => l.id === skill.id) === -1),
376+
s => s.name,
377+
);
378+
373379
return (
374380
<div styleName={containerStyle}>
375381
{

src/shared/components/Settings/Profile/Skills/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@
361361

362362
.mobile-buttons {
363363
display: none;
364+
margin-top: 10px;
364365

365366
@include upto-sm {
366367
display: flex;

src/shared/components/Settings/Tools/Devices/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@
160160
@include upto-sm {
161161
width: 100%;
162162
}
163+
164+
> div {
165+
@include upto-sm {
166+
margin-top: 5px;
167+
}
168+
}
163169
}
164170

165171
&.col-2 {

src/shared/components/Settings/Tools/ServiceProviders/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@
164164
@include upto-sm {
165165
width: 100%;
166166
}
167+
168+
> div {
169+
@include upto-sm {
170+
margin-top: 5px;
171+
}
172+
}
167173
}
168174

169175
&.col-2 {

src/shared/components/Settings/Tools/Software/List/Item/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
height: 49px;
2525
width: 49px;
2626
margin-right: 18px;
27+
28+
svg {
29+
padding-top: 1px;
30+
}
2731
}
2832

2933
.software-parameters {

src/shared/components/Settings/Tools/Software/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@
166166
@include upto-sm {
167167
width: 100%;
168168
}
169+
170+
> div {
171+
@include upto-sm {
172+
margin-top: 5px;
173+
}
174+
}
169175
}
170176

171177
&.col-2 {

0 commit comments

Comments
 (0)