Add contact form: public key instead of address (#523)
This commit is contained in:
parent
d25ac5e0fe
commit
8d963726a7
|
@ -45,7 +45,7 @@
|
|||
:photo-path (identicon whisper-identity)
|
||||
:whisper-identity whisper-identity}]
|
||||
(dispatch [:add-new-contact contact]))
|
||||
(dispatch [:set :new-contact-address-error (label :t/unknown-address)]))))
|
||||
(dispatch [:set :new-contact-public-key-error (label :t/unknown-address)]))))
|
||||
(dispatch [:add-new-contact {:name (generate-gfy)
|
||||
:photo-path (identicon id)
|
||||
:whisper-identity id}])))
|
||||
|
@ -61,7 +61,7 @@
|
|||
(label :t/contact-already-added)
|
||||
|
||||
(not (s/valid? ::v/whisper-identity whisper-identity))
|
||||
(label :t/enter-valid-address)
|
||||
(label :t/enter-valid-public-key)
|
||||
|
||||
:else error))
|
||||
|
||||
|
@ -85,10 +85,10 @@
|
|||
:input-style st/qr-input
|
||||
:value whisper-identity
|
||||
:wrapper-style button-input
|
||||
:label (label :t/address)
|
||||
:label (label :t/public-key)
|
||||
:on-change-text #(do
|
||||
(dispatch [:set-in [:new-contact-identity] %])
|
||||
(dispatch [:set :new-contact-address-error nil]))}]
|
||||
(dispatch [:set-in [:new-contact-identity] %])
|
||||
(dispatch [:set :new-contact-public-key-error nil]))}]
|
||||
[scan-button {:show-label? (zero? (count whisper-identity))
|
||||
:handler #(dispatch [:scan-qr-code
|
||||
{:toolbar-title (label :t/new-contact)}
|
||||
|
@ -97,7 +97,7 @@
|
|||
|
||||
(defview new-contact []
|
||||
[new-contact-identity [:get :new-contact-identity]
|
||||
error [:get :new-contact-address-error]
|
||||
error [:get :new-contact-public-key-error]
|
||||
account [:get-current-account]]
|
||||
[view st/contact-form-container
|
||||
[status-bar]
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
:whisper-identity "Whisper Identity"
|
||||
:address-explication "Maybe here should be some text explaining what an address is and where to look for it"
|
||||
:enter-valid-address "Please enter a valid address or scan a QR code"
|
||||
:enter-valid-public-key "Please enter a valid public key or scan a QR code"
|
||||
:contact-already-added "The contact has already been added"
|
||||
:can-not-add-yourself "You can't add yourself"
|
||||
:unknown-address "Unknown address"
|
||||
|
|
|
@ -186,6 +186,7 @@
|
|||
:whisper-identity "Скрытая личность"
|
||||
:address-explication "Может быть, здесь должен быть какой-то текст, поясняющий адрес и то, где его искать"
|
||||
:enter-valid-address "Введите действительный адрес или сканируйте QR-код"
|
||||
:enter-valid-public-key "Введите действительный публичный ключ или сканируйте QR-код"
|
||||
:contact-already-added "Контакт уже добавлен"
|
||||
:can-not-add-yourself "Вы не можете добавить себя"
|
||||
:unknown-address "Неизвестный адрес"
|
||||
|
|
|
@ -183,6 +183,7 @@
|
|||
:whisper-identity "Прошепотіти справжність"
|
||||
:address-explication "Можливо тут повинен бути текст, який пояснює, що таке адреса і де її шукати"
|
||||
:enter-valid-address "Будь ласка, введіть дійсну адресу або відскануйте QR-код"
|
||||
:enter-valid-public-key "Будь ласка, введіть дійсний відкритий ключ або відскануйте QR-код"
|
||||
:contact-already-added "Контакт вже додано"
|
||||
:can-not-add-yourself "Ви не можете додати себе"
|
||||
:unknown-address "Невідома адреса"
|
||||
|
|
Loading…
Reference in New Issue