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

Commit 0b6fef9

Browse files
author
Jenkins Continuous Integration Server
committed
Merge commit 'a1b41ab439965ee309d80ea35f1fa3e004bebdf4' into HEAD
2 parents 6576ff0 + a1b41ab commit 0b6fef9

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

app/account/account.routes.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import angular from 'angular'
1717
}
1818
},
1919
'login': {
20+
parent: 'auth',
2021
url: '/login/?next&code&state&status&userJWTToken&utm_source&utm_medium&utm_campaign',
2122
views: {
2223
'header@': {},
@@ -36,8 +37,38 @@ import angular from 'angular'
3637
}
3738
]
3839

40+
},
41+
'register': {
42+
url: '/register/?next&utm_source&utm_medium&utm_campaign',
43+
parent: 'auth',
44+
views: {
45+
'header@': {},
46+
'container@': {},
47+
'footer@': {}
48+
},
49+
data: {
50+
title: 'Join',
51+
authRequired: false
52+
},
53+
onEnter: ['$state', '$window', '$stateParams', 'logger',
54+
function($state, $window, $stateParams, logger) {
55+
var next = $state.href('dashboard', {}, {absolute: true})
56+
if ($stateParams.next) {
57+
next = decodeURIComponent($stateParams.next)
58+
}
59+
var queryStr = '?retUrl=' + encodeURIComponent(next)
60+
for(var param in $stateParams) {
61+
if ($stateParams[param]) {
62+
queryStr += ('&' + param + '=' + encodeURIComponent($stateParams[param]))
63+
}
64+
}
65+
$window.location = CONSTANTS.ACCOUNTS_APP_URL + '/registration' + queryStr
66+
}
67+
]
68+
3969
},
4070
logout: {
71+
parent: 'auth',
4172
url: '/logout/',
4273
views: {
4374
'header@': {},

app/topcoder.routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import moment from 'moment'
2828
if (path.indexOf('?') > -1) {
2929
return path.replace('?', '/?')
3030
}
31-
return path + '/'
31+
$location.replace().path(path + '/')
3232
})
3333

3434
var states = {

webpack.config.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ if (CI === 'master') {
1616
process.env.NODE_ENV = 'development'
1717
}
1818

19-
20-
process.env.CONNECTOR_URL = `https://accounts.${process.env.DOMAIN}/connector.html`
21-
process.env.ACCOUNTS_APP_URL = `https://accounts.${process.env.DOMAIN}/tc`
19+
var accountsAppURL = null
20+
if (process.env.ACCOUNTS_APP_URL) {
21+
accountsAppURL = process.env.ACCOUNTS_APP_URL
22+
}
23+
var accountsConnectorURL = null
24+
if (process.env.ACCOUNTS_APP_CONNECTOR_URL) {
25+
accountsConnectorURL = process.env.ACCOUNTS_APP_CONNECTOR_URL
26+
}
2227

2328
const config = require('appirio-tech-webpack-config')({
2429
dirname: __dirname,
@@ -34,4 +39,11 @@ const config = require('appirio-tech-webpack-config')({
3439

3540
if (CI) config.output.publicPath = process.env.ASSET_PREFIX
3641

42+
if (accountsAppURL) {
43+
process.env.ACCOUNTS_APP_URL = accountsAppURL
44+
}
45+
if (accountsConnectorURL) {
46+
process.env.ACCOUNTS_APP_CONNECTOR_URL = accountsConnectorURL
47+
}
48+
3749
module.exports = config

0 commit comments

Comments
 (0)