feat(market): embed offer photos inline instead of a media server

Replace the Blossom media-server approach with a fully decentralized one:
generate a small (~320px) JPEG thumbnail from the lot's cover photo and
embed it in the offer event as a data: URI, so photos ride the relays with
no server and no IP leak. The full photo stays in the encrypted inventory.

- offer_thumbnail.dart: downscale-until-it-fits data-URI builder + decoder
- market_widgets: render data: URIs from memory, http(s) URLs from network
- offers_cubit: publish a thumbnail (best-effort) in place of an upload
- drop MediaTransport/Blossom from commons_core (http/crypto deps) and the
  media-server setting; parked on branch parked/offer-photos-blossom

Relay event-size limits cap the image to a thumbnail; higher-res sharing
would need the parked Blossom path.
This commit is contained in:
vjrj 2026-07-10 21:27:59 +02:00
parent fa53295439
commit 9109581be0
24 changed files with 230 additions and 411 deletions

View file

@ -483,9 +483,7 @@
"noProfile": "Esta persona entá nun compartió'l so perfil",
"copyId": "Copiar códigu",
"idCopied": "Códigu copiáu",
"photo": "Semeya",
"mediaServerLabel": "Sirvidor de semeyes",
"mediaServerHelp": "Ónde s'agospien les semeyes de les ufiertes pa que otres persones les vean. Déxalo baleru pa compartir ensin semeyes."
"photo": "Semeya"
},
"profile": {
"title": "El to perfil",

View file

@ -486,9 +486,7 @@
"noProfile": "This person hasn't shared a profile yet",
"copyId": "Copy code",
"idCopied": "Code copied",
"photo": "Photo",
"mediaServerLabel": "Photo server",
"mediaServerHelp": "Where offer photos are hosted so others can see them. Leave empty to share without photos."
"photo": "Photo"
},
"profile": {
"title": "Your profile",

View file

@ -485,9 +485,7 @@
"noProfile": "Esta persona aún no ha compartido su perfil",
"copyId": "Copiar código",
"idCopied": "Código copiado",
"photo": "Foto",
"mediaServerLabel": "Servidor de fotos",
"mediaServerHelp": "Dónde se alojan las fotos de las ofertas para que otras personas las vean. Déjalo vacío para compartir sin fotos."
"photo": "Foto"
},
"profile": {
"title": "Tu perfil",

View file

@ -482,9 +482,7 @@
"noProfile": "Esta pessoa ainda não partilhou o seu perfil",
"copyId": "Copiar código",
"idCopied": "Código copiado",
"photo": "Foto",
"mediaServerLabel": "Servidor de fotos",
"mediaServerHelp": "Onde as fotos das ofertas ficam alojadas para que outras pessoas as vejam. Deixe vazio para partilhar sem fotos."
"photo": "Foto"
},
"profile": {
"title": "O teu perfil",

View file

@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 4
/// Strings: 1560 (390 per locale)
/// Strings: 1552 (388 per locale)
///
/// Built on 2026-07-10 at 19:08 UTC
/// Built on 2026-07-10 at 19:23 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import

View file

@ -692,8 +692,6 @@ class _Translations$market$ast extends Translations$market$en {
@override String get copyId => 'Copiar códigu';
@override String get idCopied => 'Códigu copiáu';
@override String get photo => 'Semeya';
@override String get mediaServerLabel => 'Sirvidor de semeyes';
@override String get mediaServerHelp => 'Ónde s\'agospien les semeyes de les ufiertes pa que otres persones les vean. Déxalo baleru pa compartir ensin semeyes.';
}
// Path: profile
@ -1460,8 +1458,6 @@ extension on TranslationsAst {
'market.copyId' => 'Copiar códigu',
'market.idCopied' => 'Códigu copiáu',
'market.photo' => 'Semeya',
'market.mediaServerLabel' => 'Sirvidor de semeyes',
'market.mediaServerHelp' => 'Ónde s\'agospien les semeyes de les ufiertes pa que otres persones les vean. Déxalo baleru pa compartir ensin semeyes.',
'profile.title' => 'El to perfil',
'profile.name' => 'Nome',
'profile.nameHint' => 'Cómo te ven los demás',

View file

@ -1285,12 +1285,6 @@ class Translations$market$en {
/// en: 'Photo'
String get photo => 'Photo';
/// en: 'Photo server'
String get mediaServerLabel => 'Photo server';
/// en: 'Where offer photos are hosted so others can see them. Leave empty to share without photos.'
String get mediaServerHelp => 'Where offer photos are hosted so others can see them. Leave empty to share without photos.';
}
// Path: profile
@ -2230,8 +2224,6 @@ extension on Translations {
'market.copyId' => 'Copy code',
'market.idCopied' => 'Code copied',
'market.photo' => 'Photo',
'market.mediaServerLabel' => 'Photo server',
'market.mediaServerHelp' => 'Where offer photos are hosted so others can see them. Leave empty to share without photos.',
'profile.title' => 'Your profile',
'profile.name' => 'Display name',
'profile.nameHint' => 'How others see you',

View file

@ -694,8 +694,6 @@ class _Translations$market$es extends Translations$market$en {
@override String get copyId => 'Copiar código';
@override String get idCopied => 'Código copiado';
@override String get photo => 'Foto';
@override String get mediaServerLabel => 'Servidor de fotos';
@override String get mediaServerHelp => 'Dónde se alojan las fotos de las ofertas para que otras personas las vean. Déjalo vacío para compartir sin fotos.';
}
// Path: profile
@ -1464,8 +1462,6 @@ extension on TranslationsEs {
'market.copyId' => 'Copiar código',
'market.idCopied' => 'Código copiado',
'market.photo' => 'Foto',
'market.mediaServerLabel' => 'Servidor de fotos',
'market.mediaServerHelp' => 'Dónde se alojan las fotos de las ofertas para que otras personas las vean. Déjalo vacío para compartir sin fotos.',
'profile.title' => 'Tu perfil',
'profile.name' => 'Nombre',
'profile.nameHint' => 'Cómo te ven los demás',

View file

@ -691,8 +691,6 @@ class _Translations$market$pt extends Translations$market$en {
@override String get copyId => 'Copiar código';
@override String get idCopied => 'Código copiado';
@override String get photo => 'Foto';
@override String get mediaServerLabel => 'Servidor de fotos';
@override String get mediaServerHelp => 'Onde as fotos das ofertas ficam alojadas para que outras pessoas as vejam. Deixe vazio para partilhar sem fotos.';
}
// Path: profile
@ -1458,8 +1456,6 @@ extension on TranslationsPt {
'market.copyId' => 'Copiar código',
'market.idCopied' => 'Código copiado',
'market.photo' => 'Foto',
'market.mediaServerLabel' => 'Servidor de fotos',
'market.mediaServerHelp' => 'Onde as fotos das ofertas ficam alojadas para que outras pessoas as vejam. Deixe vazio para partilhar sem fotos.',
'profile.title' => 'O teu perfil',
'profile.name' => 'Nome',
'profile.nameHint' => 'Como os outros te veem',