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 TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
// Translations
@override late final _Translations$avatar$es avatar = _Translations$avatar$es._(_root);
@override late final _Translations$favorites$es favorites = _Translations$favorites$es._(_root);
@override late final _Translations$seedSaving$es seedSaving = _Translations$seedSaving$es._(_root);
@override late final _Translations$calendar$es calendar = _Translations$calendar$es._(_root);
@override late final _Translations$app$es app = _Translations$app$es._(_root);
@ -99,6 +100,20 @@ class _Translations$avatar$es extends Translations$avatar$en {
@override String get remove => 'Quitar';
}
// Path: favorites
class _Translations$favorites$es extends Translations$favorites$en {
_Translations$favorites$es._(TranslationsEs root) : this._root = root, super.internal(root);
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get title => 'Favoritos';
@override String get empty => 'Aún no tienes favoritos. Guarda ofertas que te gusten del mercado.';
@override String get save => 'Guardar en favoritos';
@override String get remove => 'Quitar de favoritos';
@override String get unavailable => 'Ya no está disponible';
}
// Path: seedSaving
class _Translations$seedSaving$es extends Translations$seedSaving$en {
_Translations$seedSaving$es._(TranslationsEs root) : this._root = root, super.internal(root);
@ -1314,6 +1329,11 @@ extension on TranslationsEs {
'avatar.fromPhoto' => 'Hacer o elegir una foto',
'avatar.illustration' => 'O elige un dibujo',
'avatar.remove' => 'Quitar',
'favorites.title' => 'Favoritos',
'favorites.empty' => 'Aún no tienes favoritos. Guarda ofertas que te gusten del mercado.',
'favorites.save' => 'Guardar en favoritos',
'favorites.remove' => 'Quitar de favoritos',
'favorites.unavailable' => 'Ya no está disponible',
'seedSaving.title' => 'Conservar su semilla',
'seedSaving.subtitle' => 'Lo que hace falta para mantener la variedad fiel',
'seedSaving.lifeCycle' => 'Ciclo',
@ -1817,6 +1837,8 @@ extension on TranslationsEs {
'sale.hours' => 'horas',
'sale.note' => 'Nota (opcional)',
'sale.save' => 'Guardar',
_ => null,
} ?? switch (path) {
'sale.delete' => 'Quitar',
'sale.removeConfirm' => '¿Quitar esta venta?',
_ => null,