feat: space avatar color with color picker UI
Add avatarColor field to spaces, matching the user avatar color system. Spaces get a random color on creation and owners can change it in space settings. The color controls the fallback gradient when no icon is uploaded, replacing the old deterministic hash-based gradient. Includes full federation support, explore page, mutual spaces, and color picker in both create and settings modals.
This commit is contained in:
@@ -7,6 +7,7 @@ import { handleClientEvent } from './events.js';
|
||||
import { computePermissions, PermissionBits, permissionsToString } from '../utils/permissions.js';
|
||||
import type {
|
||||
User,
|
||||
Space,
|
||||
SpaceWithChannelsAndMembers,
|
||||
MemberWithUser,
|
||||
Channel,
|
||||
@@ -793,6 +794,7 @@ function buildReadyPayload(userId: string): {
|
||||
name: spaceRow.name,
|
||||
icon: spaceRow.icon,
|
||||
banner: spaceRow.banner ?? null,
|
||||
avatarColor: (spaceRow.avatarColor as Space['avatarColor']) ?? null,
|
||||
ownerId: spaceRow.ownerId,
|
||||
inviteCode: spaceRow.inviteCode,
|
||||
visibility: (spaceRow.visibility ?? 'private') as SpaceWithChannelsAndMembers['visibility'],
|
||||
|
||||
Reference in New Issue
Block a user