Changeset 3c196f9 in Klonkt


Ignore:
Timestamp:
06/14/2026 05:01:56 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
05a6ca0
Parents:
42081fb
Message:

fix: view switcher on non-feed pages goes to the SITE home, not global /

From a post (or account/search), Timeline/Grid navigated to '/', which in
hub is the hub overview rather than that artist's timeline. Now via
siteUrlBase (body data-site-base) -> /user/<slug>/ in hub, '/' in solo.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    r42081fb r3c196f9  
    237237</head>
    238238
    239 <body class="<%= bodyClass || 'on-home' %> has-bottom-tab" data-feed-view="<%= _e(safeSite.feed_view_default || 'timeline') %>" data-grid-cols="3">
     239<body class="<%= bodyClass || 'on-home' %> has-bottom-tab" data-feed-view="<%= _e(safeSite.feed_view_default || 'timeline') %>" data-grid-cols="3" data-site-base="<%= _e((typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '') %>">
    240240
    241241<% if (user && user.readonly) { %>
     
    384384      // the page transition matches the rest of the site's nav.
    385385      if (!isFeedPage()) {
     386        // Naar de SITE-home in de gekozen view (siteUrlBase), niet de globale '/'
     387        // — in hub is '/' de hub-overview, niet de tijdlijn van deze artiest.
     388        var base = body.dataset.siteBase || '';
    386389        if (window.htmx) {
    387           window.htmx.ajax('GET', '/?partial=1', { target: '#pcms-main', swap: 'innerHTML' });
    388           history.pushState({}, '', '/');
     390          window.htmx.ajax('GET', base + '/?partial=1', { target: '#pcms-main', swap: 'innerHTML' });
     391          history.pushState({}, '', base + '/');
    389392        } else {
    390           location.href = '/';
     393          location.href = base + '/';
    391394        }
    392395      }
Note: See TracChangeset for help on using the changeset viewer.