Changeset 82079ad in Klonkt for src/views/pages/account.ejs


Ignore:
Timestamp:
06/24/2026 12:31:43 PM (3 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
3d7312a
Parents:
52ea6df
Message:

feat: one identity — user avatar falls back to the site photo everywhere

When a user has no own account avatar, display their site's profile photo across
the account page, top nav (render.js) and comments. No DB copy → stays in sync.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/account.ejs

    r52ea6df r82079ad  
    3131          <label class="ax-avatar-wrap" title="<%= t('acct.avatar_change') %>">
    3232            <span class="ax-profile-avatar">
    33               <% if (account.avatar_url) { %>
    34                 <img src="<%= account.avatar_url %>" alt="">
     33              <% var _av = account.avatar_url || (typeof siteAvatar !== 'undefined' ? siteAvatar : null); %>
     34              <% if (_av) { %>
     35                <img src="<%= _av %>" alt="">
    3536              <% } else { %>
    3637                <span><%= account.username.charAt(0).toUpperCase() %></span>
     
    4546      <% } else { %>
    4647        <span class="ax-profile-avatar ax-profile-avatar-static">
    47           <% if (account.avatar_url) { %>
    48             <img src="<%= account.avatar_url %>" alt="">
     48          <% var _av2 = account.avatar_url || (typeof siteAvatar !== 'undefined' ? siteAvatar : null); %>
     49          <% if (_av2) { %>
     50            <img src="<%= _av2 %>" alt="">
    4951          <% } else { %>
    5052            <span><%= account.username.charAt(0).toUpperCase() %></span>
Note: See TracChangeset for help on using the changeset viewer.