diff --git a/src/Experience/Components/Menu.js b/src/Experience/Components/Menu.js index df0fb2e9..78ee7ca1 100644 --- a/src/Experience/Components/Menu.js +++ b/src/Experience/Components/Menu.js @@ -167,8 +167,20 @@ export default class Menu { if (loginBtn) { loginBtn.disabled = instance.logInLogOut.login + } + + if (logoutBtn) { logoutBtn.disabled = instance.logInLogOut.logout } + + if (instance.logInLogOut.logout === false) { + const nameInitials = + instance.experience.auth0.userData.given_name.substr(0, 1) + + instance.experience.auth0.userData.family_name.substr(0, 1) + + // Set user's name initials + logoutBtn.querySelector('.name-initials').textContent = nameInitials + } } login = async () => { diff --git a/src/index.html b/src/index.html index b7f09e9d..11d6d572 100644 --- a/src/index.html +++ b/src/index.html @@ -151,6 +151,7 @@
+
diff --git a/src/scss/style.scss b/src/scss/style.scss index 22fa468d..7399ef64 100644 --- a/src/scss/style.scss +++ b/src/scss/style.scss @@ -547,17 +547,6 @@ body.not-logged-in { font-size: calc(var(--font-size-button) * 1.25); } -#logout-button::after { - content: ''; - position: absolute; - width: 14%; - height: 14%; - border-radius: 99px; - right: 20%; - top: 20%; - background-color: greenyellow; -} - /* #endregion */ // #region GUI