feat(market): fix publish-duplicates, add offer detail page + filters
The vecino/market view had three gaps: - Publishing inventory duplicated the listing. discover() appended every offer the relay streamed, but relays legitimately resend an addressable NIP-99 event (stored copy + live echo on publish). Merge by (authorPubkeyHex, id) so each offer appears once; two authors reusing a lot id stay distinct. - No product detail. Tapping a card jumped straight to chat. Add a read-only "product page" (MarketOfferDetailScreen) with title, mode, category, eco badge, coarse location, price, a "Shared by" seller section (profile fetched by pubkey) and the message button. Reached via a new /market/offer route; cards are now fully tappable. Shows only what the network already carries — no photos/description added to the wire. - No filters. Add a filter bar (type, category, eco) mirroring inventory, each chip group shown only when a discovered offer can match it. To make the eco filter real, publish the organic flag on the wire: Offer.isOrganic -> NIP-99 'organic' tag -> OfferMapper -> ShareableLot. Tests: commons_core organic round-trip; app-side dedup, two-author separation, filter logic, mapper passthrough; detail-screen widget tests. i18n keys added to en/es/pt/ast and slang regenerated.
This commit is contained in:
parent
e852b569ce
commit
54d7c2d3b5
21 changed files with 982 additions and 107 deletions
|
|
@ -375,7 +375,11 @@
|
|||
"rangeLabel": "Hasta ónde guetar",
|
||||
"rangeNear": "Bien cerca",
|
||||
"rangeArea": "Pela mio zona",
|
||||
"rangeRegion": "La mio rexón"
|
||||
"rangeRegion": "La mio rexón",
|
||||
"sharedBy": "Compartíu por",
|
||||
"noProfile": "Esta persona entá nun compartió'l so perfil",
|
||||
"copyId": "Copiar códigu",
|
||||
"idCopied": "Códigu copiáu"
|
||||
},
|
||||
"profile": {
|
||||
"title": "El to perfil",
|
||||
|
|
|
|||
|
|
@ -378,7 +378,11 @@
|
|||
"rangeLabel": "How far to look",
|
||||
"rangeNear": "Very close",
|
||||
"rangeArea": "Around here",
|
||||
"rangeRegion": "My region"
|
||||
"rangeRegion": "My region",
|
||||
"sharedBy": "Shared by",
|
||||
"noProfile": "This person hasn't shared a profile yet",
|
||||
"copyId": "Copy code",
|
||||
"idCopied": "Code copied"
|
||||
},
|
||||
"profile": {
|
||||
"title": "Your profile",
|
||||
|
|
|
|||
|
|
@ -377,7 +377,11 @@
|
|||
"rangeLabel": "Hasta dónde buscar",
|
||||
"rangeNear": "Muy cerca",
|
||||
"rangeArea": "Por mi zona",
|
||||
"rangeRegion": "Mi región"
|
||||
"rangeRegion": "Mi región",
|
||||
"sharedBy": "Compartido por",
|
||||
"noProfile": "Esta persona aún no ha compartido su perfil",
|
||||
"copyId": "Copiar código",
|
||||
"idCopied": "Código copiado"
|
||||
},
|
||||
"profile": {
|
||||
"title": "Tu perfil",
|
||||
|
|
|
|||
|
|
@ -374,7 +374,11 @@
|
|||
"rangeLabel": "Até onde procurar",
|
||||
"rangeNear": "Muito perto",
|
||||
"rangeArea": "Pela minha zona",
|
||||
"rangeRegion": "A minha região"
|
||||
"rangeRegion": "A minha região",
|
||||
"sharedBy": "Partilhado por",
|
||||
"noProfile": "Esta pessoa ainda não partilhou o seu perfil",
|
||||
"copyId": "Copiar código",
|
||||
"idCopied": "Código copiado"
|
||||
},
|
||||
"profile": {
|
||||
"title": "O teu perfil",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 4
|
||||
/// Strings: 1464 (366 per locale)
|
||||
/// Strings: 1480 (370 per locale)
|
||||
///
|
||||
/// Built on 2026-07-10 at 13:52 UTC
|
||||
/// Built on 2026-07-10 at 15:39 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
|
|
|||
|
|
@ -645,6 +645,15 @@ class _Translations$market$ast extends Translations$market$en {
|
|||
@override String get useLocation => 'Usar el mio allugamientu averáu';
|
||||
@override String get locationFailed => 'Nun se pudo consiguir el to allugamientu — comprueba que l\'allugamientu ta activáu y el permisu concedíu';
|
||||
@override String get queued => 'Guardáu — compartirémosles cuando tengas conexón';
|
||||
@override String get shareFailed => 'Nun se pudo coneutar colos sirvidores — les tos granes nun se compartieron. Vuelvi a intentalo nun momentu.';
|
||||
@override String get rangeLabel => 'Hasta ónde guetar';
|
||||
@override String get rangeNear => 'Bien cerca';
|
||||
@override String get rangeArea => 'Pela mio zona';
|
||||
@override String get rangeRegion => 'La mio rexón';
|
||||
@override String get sharedBy => 'Compartíu por';
|
||||
@override String get noProfile => 'Esta persona entá nun compartió\'l so perfil';
|
||||
@override String get copyId => 'Copiar códigu';
|
||||
@override String get idCopied => 'Códigu copiáu';
|
||||
}
|
||||
|
||||
// Path: profile
|
||||
|
|
@ -1384,6 +1393,15 @@ extension on TranslationsAst {
|
|||
'market.useLocation' => 'Usar el mio allugamientu averáu',
|
||||
'market.locationFailed' => 'Nun se pudo consiguir el to allugamientu — comprueba que l\'allugamientu ta activáu y el permisu concedíu',
|
||||
'market.queued' => 'Guardáu — compartirémosles cuando tengas conexón',
|
||||
'market.shareFailed' => 'Nun se pudo coneutar colos sirvidores — les tos granes nun se compartieron. Vuelvi a intentalo nun momentu.',
|
||||
'market.rangeLabel' => 'Hasta ónde guetar',
|
||||
'market.rangeNear' => 'Bien cerca',
|
||||
'market.rangeArea' => 'Pela mio zona',
|
||||
'market.rangeRegion' => 'La mio rexón',
|
||||
'market.sharedBy' => 'Compartíu por',
|
||||
'market.noProfile' => 'Esta persona entá nun compartió\'l so perfil',
|
||||
'market.copyId' => 'Copiar códigu',
|
||||
'market.idCopied' => 'Códigu copiáu',
|
||||
'profile.title' => 'El to perfil',
|
||||
'profile.name' => 'Nome',
|
||||
'profile.nameHint' => 'Cómo te ven los demás',
|
||||
|
|
|
|||
|
|
@ -1199,6 +1199,18 @@ class Translations$market$en {
|
|||
|
||||
/// en: 'My region'
|
||||
String get rangeRegion => 'My region';
|
||||
|
||||
/// en: 'Shared by'
|
||||
String get sharedBy => 'Shared by';
|
||||
|
||||
/// en: 'This person hasn't shared a profile yet'
|
||||
String get noProfile => 'This person hasn\'t shared a profile yet';
|
||||
|
||||
/// en: 'Copy code'
|
||||
String get copyId => 'Copy code';
|
||||
|
||||
/// en: 'Code copied'
|
||||
String get idCopied => 'Code copied';
|
||||
}
|
||||
|
||||
// Path: profile
|
||||
|
|
@ -2116,6 +2128,10 @@ extension on Translations {
|
|||
'market.rangeNear' => 'Very close',
|
||||
'market.rangeArea' => 'Around here',
|
||||
'market.rangeRegion' => 'My region',
|
||||
'market.sharedBy' => 'Shared by',
|
||||
'market.noProfile' => 'This person hasn\'t shared a profile yet',
|
||||
'market.copyId' => 'Copy code',
|
||||
'market.idCopied' => 'Code copied',
|
||||
'profile.title' => 'Your profile',
|
||||
'profile.name' => 'Display name',
|
||||
'profile.nameHint' => 'How others see you',
|
||||
|
|
|
|||
|
|
@ -652,6 +652,10 @@ class _Translations$market$es extends Translations$market$en {
|
|||
@override String get rangeNear => 'Muy cerca';
|
||||
@override String get rangeArea => 'Por mi zona';
|
||||
@override String get rangeRegion => 'Mi región';
|
||||
@override String get sharedBy => 'Compartido por';
|
||||
@override String get noProfile => 'Esta persona aún no ha compartido su perfil';
|
||||
@override String get copyId => 'Copiar código';
|
||||
@override String get idCopied => 'Código copiado';
|
||||
}
|
||||
|
||||
// Path: profile
|
||||
|
|
@ -1398,6 +1402,10 @@ extension on TranslationsEs {
|
|||
'market.rangeNear' => 'Muy cerca',
|
||||
'market.rangeArea' => 'Por mi zona',
|
||||
'market.rangeRegion' => 'Mi región',
|
||||
'market.sharedBy' => 'Compartido por',
|
||||
'market.noProfile' => 'Esta persona aún no ha compartido su perfil',
|
||||
'market.copyId' => 'Copiar código',
|
||||
'market.idCopied' => 'Código copiado',
|
||||
'profile.title' => 'Tu perfil',
|
||||
'profile.name' => 'Nombre',
|
||||
'profile.nameHint' => 'Cómo te ven los demás',
|
||||
|
|
|
|||
|
|
@ -649,6 +649,10 @@ class _Translations$market$pt extends Translations$market$en {
|
|||
@override String get rangeNear => 'Muito perto';
|
||||
@override String get rangeArea => 'Pela minha zona';
|
||||
@override String get rangeRegion => 'A minha região';
|
||||
@override String get sharedBy => 'Partilhado por';
|
||||
@override String get noProfile => 'Esta pessoa ainda não partilhou o seu perfil';
|
||||
@override String get copyId => 'Copiar código';
|
||||
@override String get idCopied => 'Código copiado';
|
||||
}
|
||||
|
||||
// Path: profile
|
||||
|
|
@ -1392,6 +1396,10 @@ extension on TranslationsPt {
|
|||
'market.rangeNear' => 'Muito perto',
|
||||
'market.rangeArea' => 'Pela minha zona',
|
||||
'market.rangeRegion' => 'A minha região',
|
||||
'market.sharedBy' => 'Partilhado por',
|
||||
'market.noProfile' => 'Esta pessoa ainda não partilhou o seu perfil',
|
||||
'market.copyId' => 'Copiar código',
|
||||
'market.idCopied' => 'Código copiado',
|
||||
'profile.title' => 'O teu perfil',
|
||||
'profile.name' => 'Nome',
|
||||
'profile.nameHint' => 'Como os outros te veem',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue