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

fixes appirio-tech/topcoder-app/940 correct login and join buttons #459

Merged
merged 2 commits into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = function(grunt) {
swiftProgramId: grunt.option('swift-program-id') || 3445,
swiftProgramURL: grunt.option('swift-program-url') || 'http://ios.topcoder.com',
arenaURL: grunt.option('arena-url') || '//arena.topcoder.com',
accountAppURL: grunt.option('account-app-url') || 'https://accounts.topcoder.com/member',

// only used on wp setup
useGz: grunt.option('use-gz') || false,
Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"useMin": true,
"useCND": false,
"myFiltersURL": "https://staging-user-settings-service.herokuapp.com",
"cbURL": "https://coderbits.com"
"cbURL": "https://coderbits.com",
"accountAppURL": "https://accounts.topcoder.com/member"
}
2 changes: 1 addition & 1 deletion src/conf/build-dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=https://www.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --photo-link-base=https://www.topcoder-dev.com --review-app-url=software.topcoder-dev.com/review --help-app-url=help.topcoder-dev.com --forums-app-url=apps.topcoder-dev.com/forums/ --swift-program-id=3445 --swift-program-url=http://ios.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --api3-url=https://api.topcoder-dev.com/v3 --use-cdn=1 --use-min=1
grunt --main-url=https://www.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --photo-link-base=https://www.topcoder-dev.com --review-app-url=software.topcoder-dev.com/review --help-app-url=help.topcoder-dev.com --forums-app-url=apps.topcoder-dev.com/forums/ --swift-program-id=3445 --swift-program-url=http://ios.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --api3-url=https://api.topcoder-dev.com/v3 --account-app-url=https://accounts.topcoder-dev.com/member --use-cdn=1 --use-min=1
2 changes: 1 addition & 1 deletion src/conf/build-qa.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=https://www.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=https://www.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=apps.topcoder-qa.com/forums/ --swift-program-id=3445 --swift-program-url=http://ios.topcoder-qa.com --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 --use-cdn=1 --use-min=1
grunt --main-url=https://www.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=https://www.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=apps.topcoder-qa.com/forums/ --swift-program-id=3445 --swift-program-url=http://ios.topcoder-qa.com --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 account-app-url=https://accounts.topcoder-qa.com/member --use-cdn=1 --use-min=1
2 changes: 1 addition & 1 deletion src/conf/debug-dev1-dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=https://dev1.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --use-cdn=1 --use-min=1
grunt --main-url=https://dev1.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --account-app-url=https://accounts.topcoder-dev.com/member --use-cdn=1 --use-min=1
2 changes: 1 addition & 1 deletion src/conf/debug-local-dev.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=http://local.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" dev
grunt --main-url=http://local.topcoder-dev.com --auth-main-url=topcoder-dev.auth0.com --auth-client-id=JFDo7HMkf0q2CkVFHojy3zHWafziprhT --auth-callback-url=https://www.topcoder-dev.com/reg2/callback.action --api-url=https://api.topcoder-dev.com/v2 --lc-url=https://dev-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://dev-lc1-discussion-service.herokuapp.com --lc-user-url=https://dev-lc1-user-service.herokuapp.com --lc-site-url=https://dev-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-dev.com --blog-rss-feed="https://www.topcoder-dev.com/feed/?post_type=blog" --account-app-url=https://accounts.topcoder-dev.com/member dev
2 changes: 1 addition & 1 deletion src/conf/debug-local-qa.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
grunt --main-url=http://local.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=https://www.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=forums.topcoder-qa.com --swift-program-id=3445 --swift-program-url=http://apple.topcoder-qa.com --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 --use-cdn=1 --use-min=1
grunt --main-url=http://local.topcoder-qa.com --auth-main-url=topcoder-qa.auth0.com --auth-client-id=EVOgWZlCtIFlbehkq02treuRRoJk12UR --auth-callback-url="https://www.topcoder-qa.com/reg2/callback.action" --api-url=https://api.topcoder-qa.com/v2 --lc-url=https://qa-lc1-ext-challenge-service.herokuapp.com --lc-discussion-url=https://qa-lc1-discussion-service.herokuapp.com --lc-user-url=https://qa-lc1-user-service.herokuapp.com --lc-site-url=https://qa-lc1-challenge-app.herokuapp.com --my-filters-url=https://staging-user-settings-service.herokuapp.com --community-url=//community.topcoder-qa.com --photo-link-base=https://www.topcoder-qa.com --review-app-url=software.topcoder-qa.com/review --help-app-url=help.topcoder-qa.com --forums-app-url=forums.topcoder-qa.com --swift-program-id=3445 --swift-program-url=http://apple.topcoder-qa.com --blog-rss-feed="https://www.topcoder-qa.com/feed/?post_type=blog" --api3-url=https://api.topcoder-qa.com/v3 account-app-url=https://accounts.topcoder-qa.com/member --use-cdn=1 --use-min=1
6 changes: 5 additions & 1 deletion src/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ <h2>Comment Examples</h2>
}

vm.login = function() {
window.location.href = "/login?next=" + encodeURIComponent(window.location.href);
window.location.href = tcconfig.accountAppURL + "?next=" + encodeURIComponent(window.location.href);
}

vm.join = function() {
window.location.href = tcconfig.accountAppURL + '/registration?next=' + encodeURIComponent(window.location.href);
}

vm.logout = function() {
Expand Down
10 changes: 8 additions & 2 deletions src/js/app/header/partials/header-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<div class="show-small mobile-heading"><span ng-if="main.menuVisible" class="tc-text-logo">[ topcoder ]</span>
<button type="button" ng-if="!main.menuVisible" ng-click="main.menuVisible = true" class="btn-open-menu">Menu</button>
<button type="button" ng-if="main.menuVisible" ng-click="main.menuVisible = false" class="btn-close-menu"></button>
<a ng-href={{vm.profileLink}} ng-switch="vm.isAuth" data-ng-if="!main.menuVisible" class="user-link"><img ng-switch-when="true" ng-src="{{vm.photoURL}}" class="user-avatar"/><span ng-switch-when="false" class="btn-link">JOIN</span></a>
<div data-ng-if="!main.menuVisible" class="user-link">
<a ng-href={{vm.profileLink}} ng-if="vm.isAuth">
<img ng-src="{{vm.photoURL}}" class="user-avatar"/>
</a>
<a ng-if="!vm.isAuth" ng-click="vm.join()" class="tc-btn tc-btn-s btn-link">JOIN</a>
<a ng-if="!vm.isAuth" ng-click="vm.login()" class="tc-btn tc-btn-s tc-btn-ghost btn-link tc-header-login">LOG IN</a>
</div>
</div>
<ul class="main-menu">
<li class="menu-item search-wrapper">
Expand Down Expand Up @@ -40,7 +46,7 @@
</ul>
</div>
<div ng-switch-when="false" class="menu-item-header">
<a href="/register" class="tc-btn tc-btn-s btn-link">JOIN</a>
<a ng-click="vm.join()" class="tc-btn tc-btn-s btn-link">JOIN</a>
<a ng-click="vm.login()" class="tc-btn tc-btn-s tc-btn-ghost btn-link tc-header-login">LOG IN</a>
</div>
</li>
Expand Down
6 changes: 5 additions & 1 deletion wp/wp-content/themes/tcs-responsive/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ function getHashParameterByName(name, source) {
}

vm.login = function() {
window.location.href = "/login?next=" + encodeURIComponent(window.location.href);
window.location.href = tcconfig.accountAppURL + "?next=" + encodeURIComponent(window.location.href);
}

vm.join = function() {
window.location.href = tcconfig.accountAppURL + '/registration?next=' + encodeURIComponent(window.location.href);
}

vm.logout = function() {
Expand Down