in app/addons/auth/base.js [24:70]
export default ({
initialize: () => {
FauxtonAPI.addHeaderLink({
id: 'auth',
title: 'Login',
href: '#/login',
icon: 'fonticon-user',
bottomNav: true
});
FauxtonAPI.session.onChange(() => {
const session = FauxtonAPI.session;
let link;
if (session.isAdminParty()) {
link = {
id: 'auth',
title: 'Admin Party!',
href: '#/createAdmin',
icon: 'fonticon-user',
bottomNav: true
};
cleanupAuthSection();
FauxtonAPI.addHeaderLink(link);
FauxtonAPI.hideLogin();
} else if (session.isLoggedIn()) {
link = {
id: 'auth',
title: 'Your Account',
href: '#/changePassword',
icon: 'fonticon-user',
bottomNav: true
};
cleanupAuthSection();
FauxtonAPI.addHeaderLink(link);
FauxtonAPI.showLogout();
} else {
cleanupAuthSection();
FauxtonAPI.showLogin();
}
});
},
RouteObjects
});