Skip to content

Commit

Permalink
update login in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Sun authored and Chang Sun committed Jul 26, 2023
1 parent ce7d6e6 commit edce8dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit edce8dc

Please sign in to comment.