feat: avatar upload for profile/chats, fix session persistence on refresh
- Profile modal: upload/remove user avatar, edit name/bio/phone, change password - Chat info panel: upload/remove chat photo (owner/admin only) - Avatar component: render photo when available, fallback to initials - Session fix: initialize Zustand store from localStorage to prevent redirect on refresh - Backend: avatar upload endpoints for users and chats, migration adds avatar columns Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ export interface User {
|
||||
username: string;
|
||||
displayName: string;
|
||||
avatarColor: string;
|
||||
avatar?: string | null;
|
||||
bio?: string;
|
||||
phone?: string;
|
||||
isAdmin: boolean;
|
||||
@@ -15,6 +16,7 @@ export interface ChatMember {
|
||||
username: string;
|
||||
displayName: string;
|
||||
avatarColor: string;
|
||||
avatar?: string | null;
|
||||
role: 'owner' | 'admin' | 'member';
|
||||
online: boolean;
|
||||
lastSeen: string;
|
||||
@@ -27,6 +29,7 @@ export interface Chat {
|
||||
title: string;
|
||||
description?: string;
|
||||
avatarColor: string;
|
||||
avatar?: string | null;
|
||||
isPublic?: boolean;
|
||||
role: 'owner' | 'admin' | 'member';
|
||||
lastMessage?: string;
|
||||
|
||||
Reference in New Issue
Block a user