Changeset 7990e00 in Klonkt


Ignore:
Timestamp:
06/20/2026 03:10:42 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
2fc9b7f
Parents:
557a76f
Message:

fix(nav): auth form pages via htmx → audio keeps playing

Visiting /auth/admin (and /auth/login, /register, /reset…) caused a full
page-load → the persistent audio player restarted (stopped + jumped). Those
form pages now go through the link-boost (htmx, #pcms-main) so the player
stays alive. /auth/logout + /auth/google (session/Google redirect) and /oauth
deliberately remain a full navigation.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    r557a76f r7990e00  
    465465    if (a.getAttribute('rel') === 'external') return true;
    466466    var p = url.pathname;
    467     // Sessie/security/oauth → volledige navigatie (cookies, redirects).
    468     if (/^\/(logout|login|auth|oauth)(?:\/|$)/.test(p)) return true;
     467    // Sessie/redirect-acties → volledige navigatie (cookies, Google-redirect).
     468    // Maar de auth-FORMULIERpagina's (/auth/admin, /auth/login, /auth/register,
     469    // /auth/reset…) mogen wél via htmx, zodat de audiospeler blijft doorspelen
     470    // i.p.v. te herstarten/verspringen bij een volledige page-load.
     471    if (/^\/(logout|oauth)(?:\/|$)/.test(p)) return true;
     472    if (/^\/auth\/(logout|google)(?:\/|$)/.test(p)) return true;
    469473    // Feeds, PWA, service-worker, statics, media-streams, downloads.
    470474    if (/^\/(feed|atom|sitemap|manifest|robots|sw\.js|assets|media|audio|uploads)(?:\/|\.|$)/.test(p)) return true;
Note: See TracChangeset for help on using the changeset viewer.