Changeset ab544fd in Klonkt for src/views/pages/hub-home.ejs


Ignore:
Timestamp:
06/14/2026 04:49:24 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
6150acb
Parents:
a64f642
Message:

fix: PrutFolio header + roster show the SITE OWNER's photo, not the viewer's

Bug: profile-header.ejs used user.avatar_url (the LOGGED-IN viewer) as the
profile photo -> every PrutFolio showed the picture of whoever was looking
("studionoord" appeared to change along with the viewer). Now: site.profile_photo
-> avatar of the site owner -> music/initial fallback; never the viewer.
siteOwnerAvatar comes from render.js. Roster (hub overview) likewise: per-site
owner avatar instead of nothing.

Result: an artist's account avatar (/account) is immediately their PrutFolio
photo; one "own picture" that is correct, per user.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/hub-home.ejs

    ra64f642 rab544fd  
    3838        <% artists.forEach(function(a){ %>
    3939          <a class="roster-card" href="/user/<%= a.slug %>">
    40             <span class="roster-avatar"<% if (a.profile_photo) { %> style="background-image:url('<%= a.profile_photo %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>>
    41               <% if (!a.profile_photo) { %><%= (a.title || a.slug).charAt(0).toUpperCase() %><% } %>
     40            <% var _ava = a.profile_photo || a.owner_avatar; %>
     41            <span class="roster-avatar"<% if (_ava) { %> style="background-image:url('<%= _ava %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>>
     42              <% if (!_ava) { %><%= (a.title || a.slug).charAt(0).toUpperCase() %><% } %>
    4243            </span>
    4344            <span class="roster-name"><%= a.title %></span>
Note: See TracChangeset for help on using the changeset viewer.