Changeset ab544fd in Klonkt for src/routes


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/routes/hub.js

    ra64f642 rab544fd  
    3838  const artists = db.prepare(`
    3939    SELECT s.slug, s.title, s.tagline, s.profile_photo, s.accent,
     40           u.avatar_url AS owner_avatar,
    4041           (SELECT COUNT(*) FROM posts WHERE site_id = s.id AND status = 'published') AS post_count
    4142    FROM sites s
     43    LEFT JOIN users u ON u.id = s.owner_id
    4244    ORDER BY s.created_at ASC
    4345  `).all();
Note: See TracChangeset for help on using the changeset viewer.