Show real photos for people instead of scene art

Your avatar is your photo, picked from the device by tapping it on Home or
from a new Profile photo row in Settings, shrunk to 256 px and kept on the
phone (there is no upload endpoint yet). Group members show the photo the
server sends in a new `photo` field, everywhere avatars appear. Without a
photo, an initial on a neutral disc. Mock mode bundles free Unsplash
portraits for the sample people.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
This commit is contained in:
alvocool
2026-11-09 08:22:41 +03:00
parent 72786701a9
commit 1b5d105400
33 changed files with 406 additions and 168 deletions

View File

@@ -4,6 +4,9 @@ class GroupMember {
String name;
/// Their profile photo (URL), or empty for none.
String photo;
/// "Owner" or "Member".
String role;
@@ -24,6 +27,7 @@ class GroupMember {
GroupMember({
this.id = "",
this.name = "",
this.photo = "",
this.role = "Member",
this.keptRate = 0,
this.streak = 0,
@@ -38,6 +42,7 @@ class GroupMember {
return GroupMember(
id: json['id'] ?? "",
name: json['name'] ?? "",
photo: json['photo'] ?? "",
role: json['role'] ?? "Member",
keptRate: (json['keptRate'] ?? 0).toDouble(),
streak: json['streak'] ?? 0,
@@ -53,6 +58,7 @@ class GroupMember {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['name'] = name;
data['photo'] = photo;
data['role'] = role;
data['keptRate'] = keptRate;
data['streak'] = streak;