feat(settings): redesign the Import Key dialog

Rework the full-node Import Key dialog into a safer, Material-consistent, more
capable flow:

- Security: the key is masked by default (Password) with a reveal (eye) toggle,
  a DialogWarningHeader "only import a key you own" note, and the buffer is
  wiped with sodium_memzero on close and on successful import.
- Progress: import triggers a blocking full-chain rescan; the dialog now shows
  "Importing & rescanning — this can take several minutes" with LoadingDots and
  disables Import while it runs (no double-submit). Offline shows a "connect a
  running node" note and disables Import up front.
- Viewing keys: the classifier gains isViewingKey / isRecognizedImportKey;
  importPrivateKey auto-detects a shielded viewing key (zxviews…) and routes to
  z_importviewingkey (watch-only) vs z_importkey / importprivkey. The live type
  indicator shows Transparent / Shielded spending / Shielded viewing (watch-only).
- Result: on success the imported address is captured from the RPC result and
  shown via AddressCopyField.
- Material restyle (OverlayDialogSpec/BlurFloat + TactileButton + Esc) and full
  i18n (12 new keys x 8 languages; CJK subset rebuilt).

Verified: rendered on dark + light skins; a seeded zxviews… key shows the masked
field + "Shielded viewing key (watch-only)" indicator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 12:58:36 -05:00
parent 8293f02e36
commit 46f3001360
15 changed files with 274 additions and 88 deletions

View File

@@ -416,18 +416,30 @@
"history": "Histórico",
"immature_type": "Imaturo",
"import": "Importar",
"import_key_address": "Endereço:",
"import_key_btn": "Importar Chave(s)",
"import_key_done": "Importada. A carteira está reescaneando.",
"import_key_field": "Chave",
"import_key_formats": "Formatos de chave suportados:",
"import_key_full_rescan": "(0 = rescan completo)",
"import_key_import": "Importar",
"import_key_label": "Chave(s) Privada(s):",
"import_key_need_node": "Conecte um nó em execução para importar uma chave.",
"import_key_no_valid": "Nenhuma chave válida encontrada na entrada",
"import_key_progress": "Importando %d/%d...",
"import_key_rescan": "Reescanear blockchain após importação",
"import_key_rescanning": "Importando e reescaneando — pode levar vários minutos",
"import_key_reveal_tip": "Mostrar/ocultar a chave",
"import_key_start_height": "Altura inicial:",
"import_key_success": "Chaves importadas com sucesso",
"import_key_t_format": "Chaves privadas WIF de endereços T",
"import_key_title": "Importar Chave Privada",
"import_key_tooltip": "Digite uma ou mais chaves privadas, uma por linha.\nSuporta chaves de z-endereço e t-endereço.\nLinhas começando com # são tratadas como comentários.",
"import_key_type_tkey": "Chave privada transparente",
"import_key_type_unknown": "Formato de chave não reconhecido",
"import_key_type_zspend": "Chave de gasto blindada",
"import_key_type_zview": "Chave de visualização blindada (somente leitura)",
"import_key_warn": "Importe apenas uma chave que você possui — ela concede acesso aos seus fundos.",
"import_key_warning": "Aviso: Nunca compartilhe suas chaves privadas! Importar chaves de fontes não confiáveis pode comprometer sua carteira.",
"import_key_z_format": "Chaves de gasto de z-endereço (secret-extended-key-...)",
"import_private_key": "Importar Chave Privada...",