Change profile button; remove logout from profile page.

This commit is contained in:
yukirij 2024-10-15 01:09:53 -07:00
parent b98c5055c5
commit fb749d9ede
2 changed files with 2 additions and 19 deletions

View File

@ -605,17 +605,7 @@ const SCENES = {
// Right Buttons // Right Buttons
let buttons_right = [ ]; 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); UI.mainnav(buttons_left, buttons_right);
// Main Content // Main Content

View File

@ -181,14 +181,7 @@ const UI = {
top.push(UI.button(LANG("about"), () => { LOAD(SCENES.About); }, page == "about")); top.push(UI.button(LANG("about"), () => { LOAD(SCENES.About); }, page == "about"));
if(CONTEXT.Auth !== null) { if(CONTEXT.Auth !== null) {
let callback_profile = function() { bottom.push(UI.button(LANG("account"), () => { LOAD(SCENES.Account); }));
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("extras"), () => { LOAD(SCENES.Extras) }, page == "extras")); bottom.push(UI.button(LANG("extras"), () => { LOAD(SCENES.Extras) }, page == "extras"));