Menu: add "Back to Landing Page" (stay signed in) alongside Logout
The landing page is the dispatch hub for the other LUSPA modules. Add a plain navigation link to https://lupmis4luspa.org/ that keeps the SSO session intact (no /?logout=1, no cache wipe), shown only when authenticated. Logout remains the full SSO sign-out via /user-logout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c335a8987e
commit
1d5c460f70
File diff suppressed because one or more lines are too long
1
dist/assets/index-DfnW4iL8.js.map
vendored
Normal file
1
dist/assets/index-DfnW4iL8.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-Ko1mW_fQ.js.map
vendored
1
dist/assets/index-Ko1mW_fQ.js.map
vendored
File diff suppressed because one or more lines are too long
18
dist/index.html
vendored
18
dist/index.html
vendored
@ -1601,7 +1601,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="module" crossorigin src="/assets/index-Ko1mW_fQ.js"></script>
|
<script type="module" crossorigin src="/assets/index-DfnW4iL8.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/assets/openlayers-D8ReJJOp.js">
|
<link rel="modulepreload" crossorigin href="/assets/openlayers-D8ReJJOp.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/bootstrap-D1-uvFxm.js">
|
<link rel="modulepreload" crossorigin href="/assets/bootstrap-D1-uvFxm.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/ol-ext-P1ircg-B.js">
|
<link rel="modulepreload" crossorigin href="/assets/ol-ext-P1ircg-B.js">
|
||||||
@ -2060,9 +2060,21 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
<!-- Back to Landing Page (stay signed in) — visible when authenticated.
|
||||||
|
The landing page is the dispatch hub for launching the other LUSPA
|
||||||
|
modules. Plain navigation: keeps the SSO session, no logout. -->
|
||||||
|
<a id="menu-landing-link"
|
||||||
|
href="https://lupmis4luspa.org/"
|
||||||
|
class="btn btn-primary w-100 d-none mb-2"
|
||||||
|
style="font-weight:600;">
|
||||||
|
<i class="bi bi-grid-3x3-gap-fill me-2"></i>Back to Landing Page
|
||||||
|
</a>
|
||||||
|
|
||||||
<!-- Logout (only visible when authenticated) — routes through the
|
<!-- Logout (only visible when authenticated) — routes through the
|
||||||
server logout endpoint (/?logout=1) so the PWA's own PHP session
|
server logout endpoint (/?logout=1) which destroys the PWA's PHP
|
||||||
is destroyed, not just the SSO cookie. -->
|
session and hands off to the portal's /user-logout for full SSO
|
||||||
|
logout. Distinct from "Back to Landing Page" above, which stays
|
||||||
|
signed in. -->
|
||||||
<button type="button" id="menu-signout-btn"
|
<button type="button" id="menu-signout-btn"
|
||||||
class="btn btn-outline-danger w-100 d-none"
|
class="btn btn-outline-danger w-100 d-none"
|
||||||
style="font-weight:600;">
|
style="font-weight:600;">
|
||||||
|
|||||||
16
index.html
16
index.html
@ -2051,9 +2051,21 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
<!-- Back to Landing Page (stay signed in) — visible when authenticated.
|
||||||
|
The landing page is the dispatch hub for launching the other LUSPA
|
||||||
|
modules. Plain navigation: keeps the SSO session, no logout. -->
|
||||||
|
<a id="menu-landing-link"
|
||||||
|
href="https://lupmis4luspa.org/"
|
||||||
|
class="btn btn-primary w-100 d-none mb-2"
|
||||||
|
style="font-weight:600;">
|
||||||
|
<i class="bi bi-grid-3x3-gap-fill me-2"></i>Back to Landing Page
|
||||||
|
</a>
|
||||||
|
|
||||||
<!-- Logout (only visible when authenticated) — routes through the
|
<!-- Logout (only visible when authenticated) — routes through the
|
||||||
server logout endpoint (/?logout=1) so the PWA's own PHP session
|
server logout endpoint (/?logout=1) which destroys the PWA's PHP
|
||||||
is destroyed, not just the SSO cookie. -->
|
session and hands off to the portal's /user-logout for full SSO
|
||||||
|
logout. Distinct from "Back to Landing Page" above, which stays
|
||||||
|
signed in. -->
|
||||||
<button type="button" id="menu-signout-btn"
|
<button type="button" id="menu-signout-btn"
|
||||||
class="btn btn-outline-danger w-100 d-none"
|
class="btn btn-outline-danger w-100 d-none"
|
||||||
style="font-weight:600;">
|
style="font-weight:600;">
|
||||||
|
|||||||
4
main.js
4
main.js
@ -3927,6 +3927,7 @@ function initAccountCard() {
|
|||||||
const emailEl = document.getElementById('menu-user-email');
|
const emailEl = document.getElementById('menu-user-email');
|
||||||
const detailEl = document.getElementById('menu-user-detail');
|
const detailEl = document.getElementById('menu-user-detail');
|
||||||
const signoutBtn = document.getElementById('menu-signout-btn');
|
const signoutBtn = document.getElementById('menu-signout-btn');
|
||||||
|
const landingLink = document.getElementById('menu-landing-link');
|
||||||
const signinLink = document.getElementById('menu-signin-link');
|
const signinLink = document.getElementById('menu-signin-link');
|
||||||
const noSessNote = document.getElementById('menu-no-session-note');
|
const noSessNote = document.getElementById('menu-no-session-note');
|
||||||
|
|
||||||
@ -3955,6 +3956,7 @@ function initAccountCard() {
|
|||||||
|
|
||||||
signoutBtn.classList.remove('d-none');
|
signoutBtn.classList.remove('d-none');
|
||||||
signoutBtn.addEventListener('click', () => handleSignOut(session), { once: false });
|
signoutBtn.addEventListener('click', () => handleSignOut(session), { once: false });
|
||||||
|
landingLink?.classList.remove('d-none'); // stay-signed-in route to the hub
|
||||||
signinLink?.classList.add('d-none');
|
signinLink?.classList.add('d-none');
|
||||||
noSessNote?.classList.add('d-none');
|
noSessNote?.classList.add('d-none');
|
||||||
menuBtn.removeAttribute('data-state');
|
menuBtn.removeAttribute('data-state');
|
||||||
@ -3968,6 +3970,7 @@ function initAccountCard() {
|
|||||||
detailEl.textContent = '';
|
detailEl.textContent = '';
|
||||||
|
|
||||||
signoutBtn.classList.add('d-none');
|
signoutBtn.classList.add('d-none');
|
||||||
|
landingLink?.classList.add('d-none');
|
||||||
signinLink?.classList.add('d-none');
|
signinLink?.classList.add('d-none');
|
||||||
noSessNote?.classList.remove('d-none');
|
noSessNote?.classList.remove('d-none');
|
||||||
menuBtn.dataset.state = 'no-session';
|
menuBtn.dataset.state = 'no-session';
|
||||||
@ -3981,6 +3984,7 @@ function initAccountCard() {
|
|||||||
detailEl.textContent = '';
|
detailEl.textContent = '';
|
||||||
|
|
||||||
signoutBtn.classList.add('d-none');
|
signoutBtn.classList.add('d-none');
|
||||||
|
landingLink?.classList.add('d-none'); // sign-in link below already points to the hub
|
||||||
signinLink?.classList.remove('d-none');
|
signinLink?.classList.remove('d-none');
|
||||||
noSessNote?.classList.add('d-none');
|
noSessNote?.classList.add('d-none');
|
||||||
menuBtn.dataset.state = 'unauthenticated';
|
menuBtn.dataset.state = 'unauthenticated';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user