Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 9fc6e80

Browse files
author
Victor George
committed
Refactor Switch component, moved inputs into _inputs
1 parent 39b37e7 commit 9fc6e80

File tree

13 files changed

+417
-264
lines changed

13 files changed

+417
-264
lines changed

app/directives/challenge-tile/challenge-tile.directive.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// Only show if not data science track
3232
p.roles
3333
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
34-
#[span Role:  ] #[span {{challenge.userDetails.roles | listRoles}}]
34+
#[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]
3535

3636
.completed-challenge(
3737
ng-show="challenge.status === 'COMPLETED' || challenge.status === 'PAST'",
@@ -65,7 +65,7 @@
6565
// Only show if not data science track
6666
p.roles
6767
span(ng-hide="challenge.track === 'DATA_SCIENCE'")
68-
#[span Role:  ] #[span {{challenge.userDetails.roles | listRoles}}]
68+
#[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]
6969

7070
.challenge.list-view(ng-show="view=='list'", ng-class="challenge.track")
7171
.active-challenge(ng-show="challenge.status === 'ACTIVE'")
@@ -76,7 +76,7 @@
7676

7777
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
7878

79-
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role:  ] #[span {{challenge.userDetails.roles | listRoles}}]
79+
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]
8080

8181
.challenge-details
8282
.challenge-info
@@ -106,7 +106,7 @@
106106

107107
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
108108

109-
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role:  ] #[span {{challenge.userDetails.roles | listRoles}}]
109+
p.roles(ng-hide="challenge.track === 'DATA_SCIENCE'") #[span Role: ] #[span {{challenge.userDetails.roles | listRoles}}]
110110

111111
.challenge-details(ng-switch-when="DATA_SCIENCE", ng-switch="challenge.subTrack", ng-class="challenge.track")
112112

app/settings/edit-profile/edit-profile.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
input(type='file', name='image', on-file-change='on-file-change', id="change-image-input", style="display: none;")
2222

2323
.file-delete
24-
button.tc-btn.tc-btn-secondary.tc-btn-s(ng-click="vm.deleteImage()", type="button") Delete
24+
button.tc-btn.tc-btn-ghost.tc-btn-warning.tc-btn-s(ng-click="vm.deleteImage()", type="button") Delete
2525

2626
.country
2727
.form-label country to represent

app/topcoder.constants.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
angular.module("CONSTANTS", [])
22

33
.constant("CONSTANTS", {
4-
"API_URL": "https://api.topcoder-qa.com/v3.0.0",
5-
"AUTH_API_URL": "https://api.topcoder-qa.com/v3",
6-
"API_URL_V2": "https://api.topcoder-qa.com/v2",
4+
"API_URL": "https://api.topcoder-dev.com/v3",
5+
"AUTH_API_URL": "https://api.topcoder-dev.com/v3",
6+
"API_URL_V2": "https://api.topcoder-dev.com/v2",
77
"ASSET_PREFIX": "",
8-
"auth0Callback": "https://api.topcoder-qa.com/pub/callback.html",
9-
"auth0Domain": "topcoder-qa.auth0.com",
10-
"BLOG_LOCATION": "https://www.topcoder-qa.com/feed/?post_type=blog",
11-
"clientId": "EVOgWZlCtIFlbehkq02treuRRoJk12UR",
12-
"COMMUNITY_URL": "//community.topcoder-qa.com",
13-
"domain": "topcoder-qa.com",
14-
"ENVIRONMENT": "qa",
15-
"FORUMS_APP_URL": "//apps.topcoder-qa.com/forums",
16-
"HELP_APP_URL": "help.topcoder-qa.com",
17-
"MAIN_URL": "https://www.topcoder-qa.com",
18-
"ARENA_URL": "//arena.topcoder-qa.com",
8+
"auth0Callback": "https://api.topcoder-dev.com/pub/callback.html",
9+
"auth0Domain": "topcoder-dev.auth0.com",
10+
"BLOG_LOCATION": "https://www.topcoder-dev.com/feed/?post_type=blog",
11+
"clientId": "JFDo7HMkf0q2CkVFHojy3zHWafziprhT",
12+
"COMMUNITY_URL": "//community.topcoder-dev.com",
13+
"domain": "topcoder-dev.com",
14+
"ENVIRONMENT": "development",
15+
"FORUMS_APP_URL": "//apps.topcoder-dev.com/forums",
16+
"HELP_APP_URL": "help.topcoder-dev.com",
17+
"MAIN_URL": "https://www.topcoder-dev.com",
18+
"ARENA_URL": "//arena.topcoder-dev.com",
1919
"NEW_CHALLENGES_URL": "https://www.topcoder.com/challenges/develop/upcoming/",
2020
"NEW_RELIC_APPLICATION_ID": "",
21-
"PHOTO_LINK_LOCATION": "https://community.topcoder-qa.com",
21+
"PHOTO_LINK_LOCATION": "https://community.topcoder-dev.com",
2222
"submissionDownloadPath": "/review/actions/DownloadContestSubmission?uid=",
2323
"SWIFT_PROGRAM_ID": 3445,
24-
"SWIFT_PROGRAM_URL": "apple.topcoder-qa.com",
24+
"SWIFT_PROGRAM_URL": "apple.topcoder-dev.com",
2525
"UPCOMING_SRMS_URL": "https://www.topcoder.com/challenges/data/upcoming/",
2626
"EVENT_USER_LOGGED_IN": "user_logged_in",
2727
"EVENT_USER_LOGGED_OUT": "user_logged_out",

assets/css/account/account.scss

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,8 @@
6060
text-transform: uppercase;
6161
}
6262

63-
input:not([type="checkbox"]), button {
64-
display: block;
65-
margin-bottom: 10px;
66-
}
67-
6863
input:not([type="checkbox"]) {
69-
height: 40px;
7064
width: 300px;
71-
padding: 0;
72-
padding-left: 15px;
73-
border: 0;
74-
@include source-sans-regular;
75-
font-size: 16px;
76-
color: #231F20;
77-
box-shadow: none;
78-
outline: none;
7965
}
8066

8167
.tips {
@@ -100,56 +86,10 @@
10086
width: 380px;
10187
}
10288

103-
input[type="text"],
104-
input[type="password"],
105-
input[type="email"],
106-
input.email,
107-
toggle-password,
108-
toggle-password-with-tips {
109-
height: 38px;
110-
background: $white;
111-
border: 1px solid #B7B7B7;
112-
box-shadow: inset 0px 0px 2px 0px rgba(183,183,183,0.30);
113-
border-radius: 2px;
114-
cursor: auto;
115-
color: #3d3d3d;
116-
font-family: "Merriweather Sans";
117-
font-size: 15px;
118-
119-
&:hover {
120-
border: 1px solid #A3A3AE;
121-
box-shadow: inset 0px 0px 2px 0px #B7B7B7;
122-
}
123-
124-
&:focus,
125-
&.focus {
126-
border: 1px solid #0096FF;
127-
outline: none;
128-
box-shadow: inset 0px 0px 2px 1px rgba(133,203,255,0.60);
129-
}
130-
131-
transition: .15s all;
132-
}
133-
134-
input:not([type="checkbox"]) {
135-
box-shadow: none;
136-
}
13789

13890
toggle-password {
13991
input#current-password-input {
14092
width: 300px;
141-
height: 20px;
142-
border: none;
143-
outline: none;
144-
box-shadow: none;
145-
}
146-
}
147-
148-
toggle-password-with-tips {
149-
input#password-input {
150-
border: none;
151-
outline: none;
152-
box-shadow: none;
15393
}
15494
}
15595

assets/css/account/login.scss

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,9 @@
2121
width: 380px;
2222
}
2323

24-
input[type="text"],
25-
input[type="password"],
26-
toggle-password {
27-
height: 38px;
28-
background: $white;
29-
border: 1px solid #B7B7B7;
30-
box-shadow: inset 0px 0px 2px 0px rgba(183,183,183,0.30);
31-
border-radius: 2px;
32-
cursor: auto;
33-
color: #3d3d3d;
34-
35-
&:hover {
36-
border: 1px solid #A3A3AE;
37-
box-shadow: inset 0px 0px 2px 0px #B7B7B7;
38-
}
39-
40-
&:focus,
41-
&.focus {
42-
border: 1px solid #0096FF;
43-
outline: none;
44-
box-shadow: inset 0px 0px 2px 1px rgba(133,203,255,0.60);
45-
}
46-
47-
transition: .15s all;
48-
}
49-
50-
input:not([type="checkbox"]) {
51-
box-shadow: none;
52-
}
53-
5424
toggle-password {
5525
input#current-password-input {
5626
width: 300px;
57-
height: 20px;
58-
border: none;
59-
outline: none;
60-
box-shadow: none;
6127
}
6228
}
6329

assets/css/account/register.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@
1717
toggle-password,
1818
toggle-password-with-tips {
1919
width: 380px;
20-
height: 42px;
21-
border-radius: 2px;
22-
border: 1px solid #D1D3D4;
2320
}
2421

2522
toggle-password,
2623
toggle-password-with-tips {
2724
input#password-input,
2825
input#current-password-input {
2926
width: 300px;
30-
height: 20px;
31-
border: none;
3227
}
3328
}
3429

assets/css/account/reset-password.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,13 @@
1414
input[type="email"],
1515
toggle-password-with-tips {
1616
width: 380px;
17-
height: 42px;
18-
border-radius: 2px;
19-
border: 1px solid #D1D3D4;
20-
font-size: 12px;
21-
line-height: 14px;
2217
}
2318

2419
toggle-password,
2520
toggle-password-with-tips {
2621
input#password-input,
2722
input#current-password-input {
2823
width: 300px;
29-
height: 20px;
30-
border: none;
3124
}
3225
}
3326

assets/css/partials/_tc-buttons.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,20 @@ a.tc-btn, button.tc-btn {
128128
}
129129
}
130130

131+
&.tc-btn-warning {
132+
&:hover {
133+
background-color: $error;
134+
border-color: $error-dark;
135+
136+
}
137+
&:active {
138+
background-color: $error-dark;
139+
140+
}
141+
}
142+
143+
144+
131145
&.tc-btn-xs {
132146
height: 20px;
133147
padding: 0 10px;

0 commit comments

Comments
 (0)