Fix profile creation and add a link to the profile app

This commit is contained in:
yflory
2017-06-30 17:24:22 +02:00
parent f357ec32c2
commit 472a62730b
5 changed files with 28 additions and 6 deletions

View File

@@ -1476,6 +1476,13 @@ define([
content: Messages.user_rename
});
}
if (account) {
options.push({
tag: 'a',
attributes: {'class': 'profile'},
content: Messages.profileButton
});
}
if (parsed && (!parsed.type || parsed.type !== 'settings')) {
options.push({
tag: 'a',
@@ -1535,6 +1542,13 @@ define([
window.location.href = '/settings/';
}
});
$userAdmin.find('a.profile').click(function () {
if (parsed && parsed.type) {
window.open('/profile/');
} else {
window.location.href = '/profile/';
}
});
$userAdmin.find('a.login').click(function () {
if (window.location.pathname !== "/") {
sessionStorage.redirectTo = window.location.href;