Changeset 2cc887b in Klonkt


Ignore:
Timestamp:
06/14/2026 08:33:10 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
52215bc
Parents:
8b014ef
Message:

tenancy: Prutter in hub only; Account tile removed from admin; tenancy in all views

  • render.js: tenancy in the shared locals -> available in every view/partial.
  • topnav + bottom-tab: Prutter nav only in hub mode (hidden in solo).
  • admin dashboard: duplicate Account removed (already in mini-nav/profile menu).

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

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/middleware/render.js

    r8b014ef r2cc887b  
    4242    audioTracks: data.audioTracks || res.locals.audioTracks || [],
    4343    siteUrlBase: res.locals.siteUrlBase || '',
     44    tenancy: res.locals.tenancy || 'solo',
    4445    platforms_catalog: PLATFORMS_CATALOG,
    4546    permissions: PermissionsService,
  • src/views/pages/admin.ejs

    r8b014ef r2cc887b  
    2222        <a href="/admin/sites/<%= primarySite.slug %>/edit" class="btn">🎨 Uiterlijk</a>
    2323      <% } %>
    24       <a href="/account" class="btn">👤 Account</a>
    2524      <a href="/admin/settings" class="btn">⚙️ Instellingen</a>
    2625    <% } %>
  • src/views/partials/bottom-tab.ejs

    r8b014ef r2cc887b  
    1212const _path        = (typeof currentPath !== 'undefined' && currentPath) ? currentPath : '/';
    1313const _canPost     = !!(user && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site));
    14 const _hasPrutter  = !!(user && site && site.enable_prutter);
     14const _hasPrutter  = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub'));
    1515const _ownProfile  = user ? ('/users/' + user.username) : null;
    1616
  • src/views/partials/topnav.ejs

    r8b014ef r2cc887b  
    1515const _isAdmin     = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0;
    1616const _hasSearch   = !site || site.show_search === undefined || site.show_search;
    17 const _hasPrutter  = user && site && site.enable_prutter;
     17const _hasPrutter  = user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub');
    1818const _canPost     = user && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site);
    1919%>
Note: See TracChangeset for help on using the changeset viewer.