Change profile button; remove logout from profile page.
This commit is contained in:
parent
b98c5055c5
commit
fb749d9ede
@ -605,17 +605,7 @@ const SCENES = {
|
||||
|
||||
// Right Buttons
|
||||
let buttons_right = [ ];
|
||||
if(data.handle === CONTEXT.Auth.handle) {
|
||||
buttons_right.push(UI.button(LANG("logout"), () => {
|
||||
BADGE_UPDATE(false);
|
||||
MESSAGE_COMPOSE([
|
||||
PACK.u16(OpCode.Deauthenticate),
|
||||
]);
|
||||
sessionStorage.clear();
|
||||
CONTEXT.Auth = null;
|
||||
LOAD(SCENES.Browse);
|
||||
}));
|
||||
}
|
||||
|
||||
UI.mainnav(buttons_left, buttons_right);
|
||||
|
||||
// Main Content
|
||||
|
@ -181,14 +181,7 @@ const UI = {
|
||||
top.push(UI.button(LANG("about"), () => { LOAD(SCENES.About); }, page == "about"));
|
||||
|
||||
if(CONTEXT.Auth !== null) {
|
||||
let callback_profile = function() {
|
||||
LOAD(SCENES.Profile, { handle: this.handle });
|
||||
};
|
||||
callback_profile = callback_profile.bind({
|
||||
handle: CONTEXT.Auth.handle,
|
||||
});
|
||||
|
||||
bottom.push(UI.button(CONTEXT.Auth.handle, callback_profile));
|
||||
bottom.push(UI.button(LANG("account"), () => { LOAD(SCENES.Account); }));
|
||||
}
|
||||
bottom.push(UI.button(LANG("extras"), () => { LOAD(SCENES.Extras) }, page == "extras"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user