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:
ekke 2026-06-25 14:57:31 +00:00
parent c335a8987e
commit 1d5c460f70
6 changed files with 36 additions and 8 deletions

File diff suppressed because one or more lines are too long

1
dist/assets/index-DfnW4iL8.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

18
dist/index.html vendored
View File

@ -1601,7 +1601,7 @@
}
}
</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/bootstrap-D1-uvFxm.js">
<link rel="modulepreload" crossorigin href="/assets/ol-ext-P1ircg-B.js">
@ -2060,9 +2060,21 @@
<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
server logout endpoint (/?logout=1) so the PWA's own PHP session
is destroyed, not just the SSO cookie. -->
server logout endpoint (/?logout=1) which destroys the PWA's PHP
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"
class="btn btn-outline-danger w-100 d-none"
style="font-weight:600;">

View File

@ -2051,9 +2051,21 @@
<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
server logout endpoint (/?logout=1) so the PWA's own PHP session
is destroyed, not just the SSO cookie. -->
server logout endpoint (/?logout=1) which destroys the PWA's PHP
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"
class="btn btn-outline-danger w-100 d-none"
style="font-weight:600;">

View File

@ -3927,6 +3927,7 @@ function initAccountCard() {
const emailEl = document.getElementById('menu-user-email');
const detailEl = document.getElementById('menu-user-detail');
const signoutBtn = document.getElementById('menu-signout-btn');
const landingLink = document.getElementById('menu-landing-link');
const signinLink = document.getElementById('menu-signin-link');
const noSessNote = document.getElementById('menu-no-session-note');
@ -3955,6 +3956,7 @@ function initAccountCard() {
signoutBtn.classList.remove('d-none');
signoutBtn.addEventListener('click', () => handleSignOut(session), { once: false });
landingLink?.classList.remove('d-none'); // stay-signed-in route to the hub
signinLink?.classList.add('d-none');
noSessNote?.classList.add('d-none');
menuBtn.removeAttribute('data-state');
@ -3968,6 +3970,7 @@ function initAccountCard() {
detailEl.textContent = '';
signoutBtn.classList.add('d-none');
landingLink?.classList.add('d-none');
signinLink?.classList.add('d-none');
noSessNote?.classList.remove('d-none');
menuBtn.dataset.state = 'no-session';
@ -3981,6 +3984,7 @@ function initAccountCard() {
detailEl.textContent = '';
signoutBtn.classList.add('d-none');
landingLink?.classList.add('d-none'); // sign-in link below already points to the hub
signinLink?.classList.remove('d-none');
noSessNote?.classList.add('d-none');
menuBtn.dataset.state = 'unauthenticated';