From edce8dce119eeaf4e40654786cb1bc00650d4849 Mon Sep 17 00:00:00 2001 From: Chang Sun Date: Wed, 26 Jul 2023 16:39:21 +0200 Subject: [PATCH] update login in index.js --- src/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 71ac2bc..6d8a9e1 100644 --- a/src/index.js +++ b/src/index.js @@ -192,11 +192,13 @@ getWebId().then(webId => { const homeMessageElement = document.getElementById("homeMessage"); if (webId) { - if (window.location.pathname == "/dist/cmllogin.html") { window.location.href = "cmlconsent.html"; } + if (window.location.pathname == "/dist/cmllogin.html") { window.location.href = "/dist/cmlconsent.html"; } if (homeMessageElement) { homeMessageElement.textContent = "Welcome! " + webId; } - document.getElementById("logStatusPage").textContent = "Log Out"; - document.getElementById("logStatusFollowing").textContent = "Log Out"; + if (window.location.pathname == "/dist/cmlconsent.html") { + document.getElementById("logStatusPage").textContent = "Log Out"; + document.getElementById("logStatusFollowing").textContent = "Log Out"; + } // ***** Log out ***** // btn_login.forEach(function (btn) {