feat(market): save others' offers as favorites (Wallapop-style)

Adds a Favorites feature: a heart on the offer detail saves another
person's listing to an encrypted, per-identity SavedOffersStore
(keystore JSON snapshot, no plaintext at rest). A new /favorites screen
(wired from the drawer) lists saved offers offline-first and, when a
relay is reachable, flags ones that are gone as "no longer available".
i18n en/es/pt/ast; store + screen + detail-heart tests.
This commit is contained in:
vjrj 2026-07-13 08:21:43 +02:00
parent f6967e8cbb
commit d6225eed38
19 changed files with 806 additions and 3 deletions

View file

@ -40,6 +40,7 @@ class TranslationsPt extends Translations with BaseTranslations<AppLocale, Trans
// Translations
@override late final _Translations$avatar$pt avatar = _Translations$avatar$pt._(_root);
@override late final _Translations$favorites$pt favorites = _Translations$favorites$pt._(_root);
@override late final _Translations$seedSaving$pt seedSaving = _Translations$seedSaving$pt._(_root);
@override late final _Translations$calendar$pt calendar = _Translations$calendar$pt._(_root);
@override late final _Translations$app$pt app = _Translations$app$pt._(_root);
@ -99,6 +100,20 @@ class _Translations$avatar$pt extends Translations$avatar$en {
@override String get remove => 'Remover';
}
// Path: favorites
class _Translations$favorites$pt extends Translations$favorites$en {
_Translations$favorites$pt._(TranslationsPt root) : this._root = root, super.internal(root);
final TranslationsPt _root; // ignore: unused_field
// Translations
@override String get title => 'Favoritos';
@override String get empty => 'Ainda não tens favoritos. Guarda ofertas que gostes do mercado.';
@override String get save => 'Guardar nos favoritos';
@override String get remove => 'Remover dos favoritos';
@override String get unavailable => 'Já não está disponível';
}
// Path: seedSaving
class _Translations$seedSaving$pt extends Translations$seedSaving$en {
_Translations$seedSaving$pt._(TranslationsPt root) : this._root = root, super.internal(root);
@ -1311,6 +1326,11 @@ extension on TranslationsPt {
'avatar.fromPhoto' => 'Tirar ou escolher uma foto',
'avatar.illustration' => 'Ou escolhe um desenho',
'avatar.remove' => 'Remover',
'favorites.title' => 'Favoritos',
'favorites.empty' => 'Ainda não tens favoritos. Guarda ofertas que gostes do mercado.',
'favorites.save' => 'Guardar nos favoritos',
'favorites.remove' => 'Remover dos favoritos',
'favorites.unavailable' => 'Já não está disponível',
'seedSaving.title' => 'Guardar a sua semente',
'seedSaving.subtitle' => 'O que é preciso para manter a variedade fiel',
'seedSaving.lifeCycle' => 'Ciclo',