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:
parent
f6967e8cbb
commit
d6225eed38
19 changed files with 806 additions and 3 deletions
|
|
@ -41,6 +41,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
|
|||
|
||||
// Translations
|
||||
late final Translations$avatar$en avatar = Translations$avatar$en.internal(_root);
|
||||
late final Translations$favorites$en favorites = Translations$favorites$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);
|
||||
|
|
@ -108,6 +109,30 @@ class Translations$avatar$en {
|
|||
String get remove => 'Remove';
|
||||
}
|
||||
|
||||
// Path: favorites
|
||||
class Translations$favorites$en {
|
||||
Translations$favorites$en.internal(this._root);
|
||||
|
||||
final Translations _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'Favorites'
|
||||
String get title => 'Favorites';
|
||||
|
||||
/// en: 'No favorites yet. Save offers you like from the market.'
|
||||
String get empty => 'No favorites yet. Save offers you like from the market.';
|
||||
|
||||
/// en: 'Save to favorites'
|
||||
String get save => 'Save to favorites';
|
||||
|
||||
/// en: 'Remove from favorites'
|
||||
String get remove => 'Remove from favorites';
|
||||
|
||||
/// en: 'No longer available'
|
||||
String get unavailable => 'No longer available';
|
||||
}
|
||||
|
||||
// Path: seedSaving
|
||||
class Translations$seedSaving$en {
|
||||
Translations$seedSaving$en.internal(this._root);
|
||||
|
|
@ -2315,6 +2340,11 @@ extension on Translations {
|
|||
'avatar.fromPhoto' => 'Take or choose a photo',
|
||||
'avatar.illustration' => 'Or pick an illustration',
|
||||
'avatar.remove' => 'Remove',
|
||||
'favorites.title' => 'Favorites',
|
||||
'favorites.empty' => 'No favorites yet. Save offers you like from the market.',
|
||||
'favorites.save' => 'Save to favorites',
|
||||
'favorites.remove' => 'Remove from favorites',
|
||||
'favorites.unavailable' => 'No longer available',
|
||||
'seedSaving.title' => 'Saving its seed',
|
||||
'seedSaving.subtitle' => 'What it takes to keep the variety true',
|
||||
'seedSaving.lifeCycle' => 'Cycle',
|
||||
|
|
@ -2818,6 +2848,8 @@ extension on Translations {
|
|||
'sale.currencyHint' => '€, Ğ1, hours… (optional)',
|
||||
'sale.hours' => 'hours',
|
||||
'sale.note' => 'Note (optional)',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'sale.save' => 'Save',
|
||||
'sale.delete' => 'Remove',
|
||||
'sale.removeConfirm' => 'Remove this sale?',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue