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": "Historique",
"immature_type": "Immature",
"import": "Importer",
"import_key_address": "Adresse :",
"import_key_btn": "Importer clé(s)",
"import_key_done": "Importée. Le portefeuille réanalyse.",
"import_key_field": "Clé",
"import_key_formats": "Formats de clés pris en charge :",
"import_key_full_rescan": "(0 = rescan complet)",
"import_key_import": "Importer",
"import_key_label": "Clé(s) privée(s) :",
"import_key_need_node": "Connectez un nœud en cours d'exécution pour importer une clé.",
"import_key_no_valid": "Aucune clé valide trouvée dans l'entrée",
"import_key_progress": "Importation %d/%d...",
"import_key_rescan": "Re-scanner la blockchain après l'importation",
"import_key_rescanning": "Import et réanalyse — cela peut prendre plusieurs minutes",
"import_key_reveal_tip": "Afficher/masquer la clé",
"import_key_start_height": "Hauteur de départ :",
"import_key_success": "Clés importées avec succès",
"import_key_t_format": "Clés privées WIF d'adresses T",
"import_key_title": "Importer une clé privée",
"import_key_tooltip": "Entrez une ou plusieurs clés privées, une par ligne.\nPrend en charge les clés z-adresse et t-adresse.\nLes lignes commençant par # sont traitées comme des commentaires.",
"import_key_type_tkey": "Clé privée transparente",
"import_key_type_unknown": "Format de clé non reconnu",
"import_key_type_zspend": "Clé de dépense blindée",
"import_key_type_zview": "Clé de visualisation blindée (lecture seule)",
"import_key_warn": "N'importez qu'une clé qui vous appartient — elle donne accès à ses fonds.",
"import_key_warning": "Attention : Ne partagez jamais vos clés privées ! L'importation de clés provenant de sources non fiables peut compromettre votre portefeuille.",
"import_key_z_format": "Clés de dépenses z-adresse (secret-extended-key-...)",
"import_private_key": "Importer une clé privée...",