feat(block2): trust UI — vouch for a person in chat (web of trust)
- TrustCubit: reads how many vouch for the peer + whether YOU do; toggleVouch certifies/revokes over TrustTransport; never vouches for self; offline-safe. Kept simple — the full known-member rule (threshold+distance) and its bootstrap set are still-open policy (network-trust §2); a live count + your vouch is the honest first step. - Chat screen now opens ONE session carrying both messaging AND trust (the shared-connection shape), and shows a slim vouch banner: 'Vouched for by N' + an 'I know this person' / 'You vouch for them' toggle. - i18n en/es/pt (human words: 'I know this person', not 'certify'). Tests: 4 trust cubit + messaging + chat, 10 green; analyzer clean.
This commit is contained in:
parent
4326e79419
commit
7cba4f7fcf
10 changed files with 367 additions and 17 deletions
|
|
@ -71,6 +71,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
late final Translations$unit$en unit = Translations$unit$en.internal(_root);
|
||||
late final Translations$market$en market = Translations$market$en.internal(_root);
|
||||
late final Translations$chat$en chat = Translations$chat$en.internal(_root);
|
||||
late final Translations$trust$en trust = Translations$trust$en.internal(_root);
|
||||
}
|
||||
|
||||
// Path: app
|
||||
|
|
@ -1162,6 +1163,27 @@ class Translations$chat$en {
|
|||
String get offline => 'Set up sharing to send messages';
|
||||
}
|
||||
|
||||
// Path: trust
|
||||
class Translations$trust$en {
|
||||
Translations$trust$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'No one vouches for them yet'
|
||||
String get none => 'No one vouches for them yet';
|
||||
|
||||
/// en: 'Vouched for by {n}'
|
||||
String count({required Object n}) => 'Vouched for by ${n}';
|
||||
|
||||
/// en: 'I know this person'
|
||||
String get vouch => 'I know this person';
|
||||
|
||||
/// en: 'You vouch for them'
|
||||
String get vouched => 'You vouch for them';
|
||||
}
|
||||
|
||||
// Path: intro.slides
|
||||
class Translations$intro$slides$en {
|
||||
Translations$intro$slides$en.internal(this._root);
|
||||
|
|
@ -1945,6 +1967,10 @@ extension on Translations {
|
|||
'chat.send' => 'Send',
|
||||
'chat.empty' => 'No messages yet — say hello',
|
||||
'chat.offline' => 'Set up sharing to send messages',
|
||||
'trust.none' => 'No one vouches for them yet',
|
||||
'trust.count' => ({required Object n}) => 'Vouched for by ${n}',
|
||||
'trust.vouch' => 'I know this person',
|
||||
'trust.vouched' => 'You vouch for them',
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue