feat(settings): polish the import-key dialog + paste verify preview

Design pass on the Import Private/Viewing Key dialog:

- Group the optional scan-from-height section (label, slider, field, hint) in a
  subtle glass panel via a draw-list splitter so it reads as one distinct,
  clearly-optional block.
- Replace the boxed reveal / Paste / Clear buttons with frameless Material icon
  buttons: the eye toggle sits flush at the Key field's right edge (rounded to
  match the input frame), Paste / Clear are faint icon pills with tooltips.
- Add a centered %-of-chain label to the slider (mirrors the send-tab amount bar).

New: hovering Paste peeks at the clipboard and verifies it before pasting —
a tooltip classifies the clipboard the same way the field indicator does
(✓ valid type for this dialog / ⚠ a key for the other button / ✗ not a key),
with a preview line masked with '*' unless the key is currently revealed (then a
truncated peek). Empty clipboard shows "Clipboard is empty".

i18n: added paste_clip_empty (en + 8 langs); the preview reuses the field
indicator's type / wrong-type keys.

Reviewed via three adversarial multi-agent passes (splitter/panel, icon buttons,
slider math, and the paste preview's correctness/security + i18n); the confirmed
findings (eye hover-pill rounding, unrecognized-state color) are addressed here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 16:38:36 -05:00
parent c25da0d26d
commit 2a96c41e07
10 changed files with 155 additions and 30 deletions

View File

@@ -785,6 +785,7 @@
"output_filename": "Ausgabedateiname:",
"overview": "Übersicht",
"paste": "Einfügen",
"paste_clip_empty": "Zwischenablage ist leer",
"paste_from_clipboard": "Aus Zwischenablage einfügen",
"pay_from": "Zahlen von",
"payment_request": "ZAHLUNGSANFRAGE",

View File

@@ -785,6 +785,7 @@
"output_filename": "Nombre del archivo:",
"overview": "Resumen",
"paste": "Pegar",
"paste_clip_empty": "El portapapeles está vacío",
"paste_from_clipboard": "Pegar del Portapapeles",
"pay_from": "Pagar desde",
"payment_request": "SOLICITUD DE PAGO",

View File

@@ -785,6 +785,7 @@
"output_filename": "Nom du fichier de sortie :",
"overview": "Aperçu",
"paste": "Coller",
"paste_clip_empty": "Le presse-papiers est vide",
"paste_from_clipboard": "Coller depuis le presse-papiers",
"pay_from": "Payer depuis",
"payment_request": "DEMANDE DE PAIEMENT",

View File

@@ -785,6 +785,7 @@
"output_filename": "出力ファイル名:",
"overview": "概要",
"paste": "貼り付け",
"paste_clip_empty": "クリップボードは空です",
"paste_from_clipboard": "クリップボードから貼り付け",
"pay_from": "支払い元",
"payment_request": "支払い請求",

View File

@@ -785,6 +785,7 @@
"output_filename": "출력 파일명:",
"overview": "개요",
"paste": "붙여넣기",
"paste_clip_empty": "클립보드가 비어 있습니다",
"paste_from_clipboard": "클립보드에서 붙여넣기",
"pay_from": "보낼 곳",
"payment_request": "결제 요청",

View File

@@ -785,6 +785,7 @@
"output_filename": "Nome do arquivo de saída:",
"overview": "Resumo",
"paste": "Colar",
"paste_clip_empty": "A área de transferência está vazia",
"paste_from_clipboard": "Colar da Área de Transferência",
"pay_from": "Pagar de",
"payment_request": "SOLICITAÇÃO DE PAGAMENTO",

View File

@@ -785,6 +785,7 @@
"output_filename": "Имя выходного файла:",
"overview": "Обзор",
"paste": "Вставить",
"paste_clip_empty": "Буфер обмена пуст",
"paste_from_clipboard": "Вставить из буфера обмена",
"pay_from": "Оплатить с",
"payment_request": "ЗАПРОС НА ОПЛАТУ",

View File

@@ -785,6 +785,7 @@
"output_filename": "输出文件名:",
"overview": "概览",
"paste": "粘贴",
"paste_clip_empty": "剪贴板为空",
"paste_from_clipboard": "从剪贴板粘贴",
"pay_from": "付款来源",
"payment_request": "付款请求",