@@ -4,13 +4,16 @@ function register() {
44 alert ( 2 ) ; window . location . href = "/register" ;
55}
66document . addEventListener ( 'DOMContentLoaded' , async function ( ) {
7- if ( ! UI . authn . currentUser ( ) ) await UI . authn . checkUser ( ) ;
8- let user = UI . authn . currentUser ( ) ;
7+ const authn = UI . authn
8+ const authSession = UI . authn . authSession
9+
10+ if ( ! authn . currentUser ( ) ) await authn . checkUser ( ) ;
11+ let user = authn . currentUser ( ) ;
912
1013 // IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
1114 if ( user ) {
1215 window . localStorage . setItem ( keyname , user . uri ) ;
13- await UI . authn . authSession . logout ( ) ;
16+ await authSession . logout ( ) ;
1417 }
1518 else {
1619 let webId = window . localStorage . getItem ( keyname ) ;
@@ -31,7 +34,7 @@ document.addEventListener('DOMContentLoaded', async function() {
3134 let span = document . createElement ( "span" )
3235 span . innerHTML = html
3336 loginArea . appendChild ( span ) ;
34- loginArea . appendChild ( UI . authn . loginStatusBox ( document , null , { } ) )
37+ loginArea . appendChild ( UI . login . loginStatusBox ( document , null , { } ) )
3538 const logInButton = loginArea . querySelectorAll ( 'input' ) [ 1 ] ;
3639 logInButton . value = "Log in to see your WebID" ;
3740 const signUpButton = loginArea . querySelectorAll ( 'input' ) [ 2 ] ;
0 commit comments