@@ -4,13 +4,17 @@ function register() {
4
4
alert ( 2 ) ; window . location . href = "/register" ;
5
5
}
6
6
document . addEventListener ( 'DOMContentLoaded' , async function ( ) {
7
+ const solidLogicLib = UI . solidLogicLib
8
+ const authn = solidLogicLib . authn
9
+ const authSession = solidLogicLib . authSession
10
+
7
11
if ( ! authn . currentUser ( ) ) await authn . checkUser ( ) ;
8
12
let user = authn . currentUser ( ) ;
9
13
10
14
// IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
11
15
if ( user ) {
12
16
window . localStorage . setItem ( keyname , user . uri ) ;
13
- await authn . authSession . logout ( ) ;
17
+ await authSession . logout ( ) ;
14
18
}
15
19
else {
16
20
let webId = window . localStorage . getItem ( keyname ) ;
@@ -31,7 +35,7 @@ document.addEventListener('DOMContentLoaded', async function() {
31
35
let span = document . createElement ( "span" )
32
36
span . innerHTML = html
33
37
loginArea . appendChild ( span ) ;
34
- loginArea . appendChild ( UI . authn . loginStatusBox ( document , null , { } ) )
38
+ loginArea . appendChild ( UI . login . loginStatusBox ( document , null , { } ) )
35
39
const logInButton = loginArea . querySelectorAll ( 'input' ) [ 1 ] ;
36
40
logInButton . value = "Log in to see your WebID" ;
37
41
const signUpButton = loginArea . querySelectorAll ( 'input' ) [ 2 ] ;
0 commit comments