PolyGerrit: Fix register links to use base url
Seems that some how register links are broken without this patch. It redirects /<base_url>/#/register to /register so it dosen't include the base url. I have spent alot of time digging into this. Bug: Issue 6062 Change-Id: I6598799ca041f72b6855ce219201877683890487
This commit is contained in:
@@ -81,11 +81,12 @@
|
|||||||
if (data.hash[0] !== '/') {
|
if (data.hash[0] !== '/') {
|
||||||
data.hash = '/' + data.hash;
|
data.hash = '/' + data.hash;
|
||||||
}
|
}
|
||||||
var newUrl = data.hash;
|
var hash = data.hash;
|
||||||
if (newUrl.indexOf('/VE/') === 0) {
|
var newUrl = base + hash;
|
||||||
newUrl = '/settings' + data.hash;
|
if (hash.indexOf('/VE/') === 0) {
|
||||||
|
newUrl = base + '/settings' + data.hash;
|
||||||
}
|
}
|
||||||
page.redirect(newUrl);
|
page(newUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
restAPI.getLoggedIn().then(function(loggedIn) {
|
restAPI.getLoggedIn().then(function(loggedIn) {
|
||||||
@@ -241,7 +242,7 @@
|
|||||||
app.params = {justRegistered: true};
|
app.params = {justRegistered: true};
|
||||||
var path = ctx.params[0] || '/';
|
var path = ctx.params[0] || '/';
|
||||||
if (path[0] !== '/') { return; }
|
if (path[0] !== '/') { return; }
|
||||||
page.show(path);
|
page.show(base + path);
|
||||||
});
|
});
|
||||||
|
|
||||||
page.start();
|
page.start();
|
||||||
|
Reference in New Issue
Block a user