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": "ObsidianDragon 콘솔에 오신 것을 환영합니다",
|
||||
"console_zoom_in": "확대",
|
||||
"console_zoom_out": "축소",
|
||||
"contact_avatar": "아바타",
|
||||
"contact_avatar_badge": "배지",
|
||||
"contact_avatar_badge_hint": "주소 유형 배지를 사용합니다 — Z는 보호, T는 투명.",
|
||||
"contact_avatar_choose": "이미지 선택…",
|
||||
"contact_avatar_copy_failed": "그 이미지를 복사할 수 없습니다.",
|
||||
"contact_avatar_icon": "아이콘",
|
||||
"contact_avatar_image": "이미지",
|
||||
"contact_avatar_image_hint": "이미지는 앱에 복사되어 원본이 이동해도 계속 사용할 수 있습니다.",
|
||||
"contact_avatar_remove": "제거",
|
||||
"contact_global": "모든 지갑에 표시(전역 연락처)",
|
||||
"contact_global_badge_tt": "전역 연락처 — 모든 지갑에서 표시됨",
|
||||
"contact_global_tt": "켜짐: 어떤 지갑을 불러오든 이 연락처가 계속 표시됩니다. 꺼짐: 현재 지갑에만 속합니다.",
|
||||
"contact_preview_addr": "여기에 주소가 표시됩니다",
|
||||
"contact_preview_name": "연락처 이름",
|
||||
"contacts": "연락처",
|
||||
"contacts_search_no_match": "일치하는 연락처 없음",
|
||||
"contacts_search_placeholder": "연락처 검색...",
|
||||
@@ -465,6 +476,12 @@
|
||||
"hide_qr": "QR 숨기기",
|
||||
"hide_zero_balances": "잔액 0 숨기기",
|
||||
"history": "내역",
|
||||
"img_picker_count": "이 폴더에 이미지 %d개",
|
||||
"img_picker_empty": "이 폴더에는 하위 폴더나 이미지가 없습니다.",
|
||||
"img_picker_none": "이 폴더에 이미지가 없습니다",
|
||||
"img_picker_pictures": "사진 폴더",
|
||||
"img_picker_title": "이미지 선택",
|
||||
"img_picker_use": "이미지 사용",
|
||||
"immature_type": "미성숙",
|
||||
"import": "가져오기",
|
||||
"import_key_address": "주소:",
|
||||
|
||||
Reference in New Issue
Block a user