feat(contacts): revamp edit dialog with live preview + avatar picker
Rebuild the add/edit contact dialog on the portfolio-editor design language:
- A live preview card at the top shows the contact exactly as it renders in the
list (avatar + name + address), updating as you type and pick an avatar.
- An avatar picker (Badge / Icon / Image segmented control) lets you keep the
default Z/T type badge, choose a Material wallet icon from a searchable grid,
or set a custom image. The picker area is fixed-height so the modal doesn't
jump when switching modes.
- Custom images go through a new in-app ImagePicker (image_picker.h): a
Material overlay that browses the filesystem starting at the user's Pictures
folder, shows a thumbnail grid (decoded to raw pixels, box-downscaled to a
small texture, cached per directory and freed on navigate/close, budgeted a
few decodes per frame so large folders don't hitch), and returns the chosen
path. The chosen image is copied into <config>/contact-avatars/ (named by an
FNV hash of the source path, so re-picking is idempotent) and stored as
"img:<path>". Like FolderPicker, it takes over the modal surface while open.
- Paste is now available on both add and edit; buttons are content-sized.
Adds three sweep surfaces (contacts-edit-{icon,badge,image}) that open the
dialog on a seeded contact in each avatar mode, plus i18n keys (+ 8-language
translations; reworded two zh/ja strings to stay within the existing CJK
subset, so no font rebuild).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -287,9 +287,20 @@
|
||||
"console_welcome": "Bienvenido a la Consola de ObsidianDragon",
|
||||
"console_zoom_in": "Acercar",
|
||||
"console_zoom_out": "Alejar",
|
||||
"contact_avatar": "AVATAR",
|
||||
"contact_avatar_badge": "Insignia",
|
||||
"contact_avatar_badge_hint": "Usa la insignia de tipo de dirección: Z para blindada, T para transparente.",
|
||||
"contact_avatar_choose": "Elegir imagen…",
|
||||
"contact_avatar_copy_failed": "No se pudo copiar esa imagen.",
|
||||
"contact_avatar_icon": "Icono",
|
||||
"contact_avatar_image": "Imagen",
|
||||
"contact_avatar_image_hint": "La imagen se copia en la app para que siga disponible si el original se mueve.",
|
||||
"contact_avatar_remove": "Quitar",
|
||||
"contact_global": "Mostrar en todas las carteras (contacto global)",
|
||||
"contact_global_badge_tt": "Contacto global — visible en todas las carteras",
|
||||
"contact_global_tt": "Activado: este contacto permanece visible sin importar qué cartera cargues. Desactivado: pertenece solo a la cartera actual.",
|
||||
"contact_preview_addr": "La dirección aparecerá aquí",
|
||||
"contact_preview_name": "Nombre del contacto",
|
||||
"contacts": "Contactos",
|
||||
"contacts_search_no_match": "No hay contactos coincidentes",
|
||||
"contacts_search_placeholder": "Buscar contactos...",
|
||||
@@ -465,6 +476,12 @@
|
||||
"hide_qr": "Ocultar QR",
|
||||
"hide_zero_balances": "Ocultar saldos 0",
|
||||
"history": "Historial",
|
||||
"img_picker_count": "%d imagen(es) en esta carpeta",
|
||||
"img_picker_empty": "Esta carpeta no tiene subcarpetas ni imágenes.",
|
||||
"img_picker_none": "No hay imágenes en esta carpeta",
|
||||
"img_picker_pictures": "Carpeta de imágenes",
|
||||
"img_picker_title": "Elegir una imagen",
|
||||
"img_picker_use": "Usar imagen",
|
||||
"immature_type": "Inmaduro",
|
||||
"import": "Importar",
|
||||
"import_key_address": "Dirección:",
|
||||
|
||||
Reference in New Issue
Block a user