Skip to content

Commit 1e4ad8c

Browse files
committed
Fix logout on user page not handling view updates
This properly resets the login/out button color and hides the account settings
1 parent 9b627e4 commit 1e4ad8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

default-templates/new-account/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,15 @@ <h1>Account settings</h1>
7676
loggedIn = !!session;
7777
button.innerText = loggedIn ? 'Log out' : 'Log in';
7878
button.classList.remove('btn-default');
79+
button.classList.remove('btn-danger');
80+
button.classList.remove('btn-primary');
7981
button.classList.add(loggedIn ? 'btn-danger' : 'btn-primary');
8082
if (loggedIn) {
8183
var sessionOrigin = getOriginFromWebId(session.webId);
8284
var isOwner = sessionOrigin === location.origin;
8385
accountSettings.classList.toggle('hidden', !isOwner);
86+
} else {
87+
accountSettings.classList.toggle('hidden', true);
8488
}
8589
});
8690

0 commit comments

Comments
 (0)