Skip to content

Commit b4c4cd9

Browse files
committed
lib changes in mashlib
1 parent 08af5a5 commit b4c4cd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

common/js/index-buttons.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ function register() {
44
alert(2); window.location.href = "/register";
55
}
66
document.addEventListener('DOMContentLoaded', async function() {
7+
const solidLogicLib = UI.solidLogicLib
8+
const authn = solidLogicLib.authn
9+
const authSession = solidLogicLib.authSession
10+
711
if (!authn.currentUser()) await authn.checkUser();
812
let user = authn.currentUser();
913

1014
// IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
1115
if( user ) {
1216
window.localStorage.setItem(keyname, user.uri);
13-
await authn.authSession.logout();
17+
await authSession.logout();
1418
}
1519
else {
1620
let webId = window.localStorage.getItem(keyname);
@@ -31,7 +35,7 @@ document.addEventListener('DOMContentLoaded', async function() {
3135
let span = document.createElement("span")
3236
span.innerHTML = html
3337
loginArea.appendChild(span);
34-
loginArea.appendChild(UI.authn.loginStatusBox(document, null, {}))
38+
loginArea.appendChild(UI.login.loginStatusBox(document, null, {}))
3539
const logInButton = loginArea.querySelectorAll('input')[1];
3640
logInButton.value = "Log in to see your WebID";
3741
const signUpButton = loginArea.querySelectorAll('input')[2];

0 commit comments

Comments
 (0)