feat(app): profile photo — avatar upload in Mon compte, photo in the sidebar, drawer and top bar
packages/supabase assets module: closed AssetFailure kinds, begin / quarantine upload (upsert off) / confirm / remove, own-row state read with an explicit column list, download under the SELECT policy. App: client transport (magic byte sniff, never SVG, createImageBitmap, canvas 1024 px, JPEG 0.9, 5 MiB cap), AvatarSection (preview, save, 1 s polling up to 30 s, rejection and failure messages per closed code, removal with confirmation, in-flight row resumed at mount), auth store blob URL revoked on change and sign-out, AvatarCircle in UserBadge and the top bar link to Mon compte (D3), FR/EN strings, fake client extended, 27 new tests (app 300).
This commit is contained in:
1 parent
614887470c
commit
926dd7df8c
18 files changed
+1550
-31
No files matched your search
@@ -372,4 +372,46 @@ export const en: Dict = {
|
||||
'Not available in this version yet. It will be offered, then required for platform roles.',
|
||||
'account.security.sign_out_everywhere_note':
|
||||
'Signing out closes the session on this device.',
|
||||
'account.avatar.title': 'Profile photo',
|
||||
'account.avatar.alt': 'Profile photo',
|
||||
'account.avatar.change': 'Change photo',
|
||||
'account.avatar.save': 'Save photo',
|
||||
'account.avatar.saving': 'Uploading…',
|
||||
'account.avatar.cancel': 'Cancel',
|
||||
'account.avatar.remove': 'Remove photo',
|
||||
'account.avatar.remove_title': 'Remove the photo?',
|
||||
'account.avatar.remove_body':
|
||||
'Your profile photo will be removed. You can add another one at any time.',
|
||||
'account.avatar.remove_confirm': 'Remove',
|
||||
'account.avatar.removed': 'Photo removed.',
|
||||
'account.avatar.processing': 'Processing…',
|
||||
'account.avatar.processing_hint':
|
||||
'Your photo is being checked and resized. This takes a few seconds.',
|
||||
'account.avatar.processing_long':
|
||||
'Processing is taking longer than expected. Come back in a moment.',
|
||||
'account.avatar.saved': 'Photo saved.',
|
||||
'account.avatar.hint': 'JPEG, PNG or WebP, 5 MB at most once reduced.',
|
||||
'account.avatar.error.too_large': 'Image too large (5 MB at most).',
|
||||
'account.avatar.error.unsupported_type':
|
||||
'Unsupported format: choose a JPEG, PNG or WebP image.',
|
||||
'account.avatar.error.rate_limited':
|
||||
'Too many attempts. Try again in an hour.',
|
||||
'account.avatar.error.storage_full':
|
||||
'Storage is full. Try again later.',
|
||||
'account.avatar.error.upload_missing':
|
||||
'The upload did not complete. Try again.',
|
||||
'account.avatar.error.invalid_state':
|
||||
'This action no longer matches your current photo. Reload the page.',
|
||||
'account.avatar.error.not_found': 'Photo not found. Reload the page.',
|
||||
'account.avatar.error.network':
|
||||
'Cannot reach the server. Check your connection and try again.',
|
||||
'account.avatar.error.unknown': 'Something went wrong. Try again.',
|
||||
'account.avatar.rejected.unsupported_type':
|
||||
'Photo refused: the file is not a JPEG, PNG or WebP image.',
|
||||
'account.avatar.rejected.decode_failed':
|
||||
'Photo refused: the file is corrupt or unreadable.',
|
||||
'account.avatar.rejected.dimensions':
|
||||
'Photo refused: between 64 and 4096 pixels per side.',
|
||||
'account.avatar.rejected.processing_error':
|
||||
'Photo refused: processing failed. Try another image.',
|
||||
}
|
||||
@@ -390,4 +390,46 @@ export const fr: Dict = {
|
||||
'Pas encore disponible dans cette version. Elle sera proposée, puis exigée pour les rôles plateforme.',
|
||||
'account.security.sign_out_everywhere_note':
|
||||
'Se déconnecter ferme la session sur cet appareil.',
|
||||
'account.avatar.title': 'Photo de profil',
|
||||
'account.avatar.alt': 'Photo de profil',
|
||||
'account.avatar.change': 'Modifier la photo',
|
||||
'account.avatar.save': 'Enregistrer la photo',
|
||||
'account.avatar.saving': 'Envoi…',
|
||||
'account.avatar.cancel': 'Annuler',
|
||||
'account.avatar.remove': 'Supprimer la photo',
|
||||
'account.avatar.remove_title': 'Supprimer la photo ?',
|
||||
'account.avatar.remove_body':
|
||||
'Votre photo de profil sera retirée. Vous pourrez en ajouter une autre à tout moment.',
|
||||
'account.avatar.remove_confirm': 'Supprimer',
|
||||
'account.avatar.removed': 'Photo supprimée.',
|
||||
'account.avatar.processing': 'Traitement en cours…',
|
||||
'account.avatar.processing_hint':
|
||||
'Votre photo est vérifiée puis redimensionnée. Cela prend quelques secondes.',
|
||||
'account.avatar.processing_long':
|
||||
'Le traitement prend plus de temps que prévu. Revenez dans un instant.',
|
||||
'account.avatar.saved': 'Photo enregistrée.',
|
||||
'account.avatar.hint': 'JPEG, PNG ou WebP, 5 Mo maximum une fois réduite.',
|
||||
'account.avatar.error.too_large': 'Image trop volumineuse (5 Mo maximum).',
|
||||
'account.avatar.error.unsupported_type':
|
||||
'Format non pris en charge : choisissez une image JPEG, PNG ou WebP.',
|
||||
'account.avatar.error.rate_limited':
|
||||
'Trop de tentatives. Réessayez dans une heure.',
|
||||
'account.avatar.error.storage_full':
|
||||
'Espace de stockage saturé. Réessayez plus tard.',
|
||||
'account.avatar.error.upload_missing':
|
||||
"L'envoi ne s'est pas terminé. Réessayez.",
|
||||
'account.avatar.error.invalid_state':
|
||||
'Cette opération ne correspond plus à votre photo actuelle. Rechargez la page.',
|
||||
'account.avatar.error.not_found': 'Photo introuvable. Rechargez la page.',
|
||||
'account.avatar.error.network':
|
||||
"Impossible de joindre le serveur. Vérifiez votre connexion et réessayez.",
|
||||
'account.avatar.error.unknown': 'Une erreur est survenue. Réessayez.',
|
||||
'account.avatar.rejected.unsupported_type':
|
||||
'Photo refusée : le fichier n’est pas une image JPEG, PNG ou WebP.',
|
||||
'account.avatar.rejected.decode_failed':
|
||||
'Photo refusée : le fichier est corrompu ou illisible.',
|
||||
'account.avatar.rejected.dimensions':
|
||||
'Photo refusée : entre 64 et 4096 pixels de côté.',
|
||||
'account.avatar.rejected.processing_error':
|
||||
'Photo refusée : le traitement a échoué. Réessayez avec une autre image.',
|
||||
}
|
||||
Reference in new issue
Block a user