feat(profile): profile photo or seed-illustration avatar
Profiles had only a coloured-initial disc. Now each person can set an avatar — a real photo OR one of our own seed illustrations (so pseudonymity stays the default; no photo required). - ui/avatar.dart: the one-string value scheme carried in the kind:0 'picture' — a 'data:' photo thumbnail, a 'tane:seed:<glyph>' token, or empty. The Nostr ProfileTransport already published 'picture'. - Photos ride inline as a tiny thumbnail (reuses offerThumbnailDataUri, 24 KB cap) — no media server, like offer photos. - avatar_edit.dart: pick/take a photo, choose a seed illustration, or remove; ProfileStore stores it; ProfileScreen shows a big editable avatar and publishes it. - PeerAvatar renders photo / illustration / initial fallback. - ProfileCache gains picture/setPicture; the inbox caches peers' avatars alongside their names. - i18n avatar block (en/es/pt/ast). Tests: value scheme + PeerAvatar render modes, store + cache round-trips. Follow-up: render peers' avatars in chat/market/your-people (thread the cached picture into PeerAvatar at each call site).
This commit is contained in:
parent
d28454b010
commit
461bc3cb36
19 changed files with 375 additions and 12 deletions
|
|
@ -40,6 +40,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
Translations $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => Translations(meta: meta ?? this.$meta);
|
||||
|
||||
// Translations
|
||||
late final Translations$avatar$en avatar = Translations$avatar$en.internal(_root);
|
||||
late final Translations$seedSaving$en seedSaving = Translations$seedSaving$en.internal(_root);
|
||||
late final Translations$calendar$en calendar = Translations$calendar$en.internal(_root);
|
||||
late final Translations$app$en app = Translations$app$en.internal(_root);
|
||||
|
|
@ -86,6 +87,27 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
late final Translations$sale$en sale = Translations$sale$en.internal(_root);
|
||||
}
|
||||
|
||||
// Path: avatar
|
||||
class Translations$avatar$en {
|
||||
Translations$avatar$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Your photo or avatar'
|
||||
String get title => 'Your photo or avatar';
|
||||
|
||||
/// en: 'Take or choose a photo'
|
||||
String get fromPhoto => 'Take or choose a photo';
|
||||
|
||||
/// en: 'Or pick an illustration'
|
||||
String get illustration => 'Or pick an illustration';
|
||||
|
||||
/// en: 'Remove'
|
||||
String get remove => 'Remove';
|
||||
}
|
||||
|
||||
// Path: seedSaving
|
||||
class Translations$seedSaving$en {
|
||||
Translations$seedSaving$en.internal(this._root);
|
||||
|
|
@ -2289,6 +2311,10 @@ class Translations$intro$slides$plantare$en {
|
|||
extension on Translations {
|
||||
dynamic _flatMapFunction(String path) {
|
||||
return switch (path) {
|
||||
'avatar.title' => 'Your photo or avatar',
|
||||
'avatar.fromPhoto' => 'Take or choose a photo',
|
||||
'avatar.illustration' => 'Or pick an illustration',
|
||||
'avatar.remove' => 'Remove',
|
||||
'seedSaving.title' => 'Saving its seed',
|
||||
'seedSaving.subtitle' => 'What it takes to keep the variety true',
|
||||
'seedSaving.lifeCycle' => 'Cycle',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue