Changeset a995698 in Klonkt


Ignore:
Timestamp:
06/28/2026 12:11:39 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
0a58300
Parents:
89cc8c4
Message:

fix(ui): hide Fediverse + Notifications nav when AP/federation is off

The fedi nav item + the notifications bell (topnav + mobile profile sheet) were gated only on
canManageFedi, so they stayed visible with federation switched off. Now also gated on apEnabled,
consistent with the rest of the fedi UI which already hides when off. (The profile-sheet
Notifications item was previously ungated entirely.)

Location:
src/views/partials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/profile-sheet.ejs

    r89cc8c4 ra995698  
    5656        </a>
    5757      </li>
     58      <% if (typeof canManageFedi !== 'undefined' && canManageFedi && apEnabled) { %>
    5859      <li role="none">
    5960        <a href="/notifications" class="profile-sheet-item" role="menuitem" data-close-sheet>
     
    6364        </a>
    6465      </li>
    65       <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     66      <% } %>
     67      <% if (typeof canManageFedi !== 'undefined' && canManageFedi && apEnabled) { %>
    6668      <li role="none">
    6769        <a href="/news" class="profile-sheet-item" role="menuitem" data-close-sheet
  • src/views/partials/topnav.ejs

    r89cc8c4 ra995698  
    101101      <% } %>
    102102
    103       <% if (user && typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     103      <% if (user && typeof canManageFedi !== 'undefined' && canManageFedi && apEnabled) { %>
    104104        <a class="nav-btn nav-notif" href="/notifications" aria-label="<%= t('notif.title') %>" title="<%= t('notif.title') %>"
    105105           hx-get="/notifications?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/notifications" hx-indicator="#pcms-loading">
     
    157157                </a>
    158158              <% } %>
    159               <% if (typeof canManageFedi !== 'undefined' && canManageFedi) { %>
     159              <% if (typeof canManageFedi !== 'undefined' && canManageFedi && apEnabled) { %>
    160160                <a href="/news" role="menuitem" class="udi"
    161161                   hx-get="/news?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
Note: See TracChangeset for help on using the changeset viewer.