Tap on return permits sign-in. Fixes #1285
This commit is contained in:
parent
63bf882e65
commit
5e5b4fa2cf
|
@ -24,6 +24,10 @@
|
||||||
|
|
||||||
(def password-text-input (atom nil))
|
(def password-text-input (atom nil))
|
||||||
|
|
||||||
|
(defn login-account [password-text-input address password]
|
||||||
|
(.blur @password-text-input)
|
||||||
|
(dispatch [:login-account address password]))
|
||||||
|
|
||||||
(defview login []
|
(defview login []
|
||||||
[{:keys [address photo-path name password error processing]} [:get :login]]
|
[{:keys [address photo-path name password error processing]} [:get :login]]
|
||||||
[view ast/accounts-container
|
[view ast/accounts-container
|
||||||
|
@ -40,13 +44,12 @@
|
||||||
:on-change-text #(do
|
:on-change-text #(do
|
||||||
(dispatch [:set-in [:login :password] %])
|
(dispatch [:set-in [:login :password] %])
|
||||||
(dispatch [:set-in [:login :error] ""]))
|
(dispatch [:set-in [:login :error] ""]))
|
||||||
|
:on-submit-editing #(login-account password-text-input address password)
|
||||||
:auto-focus true
|
:auto-focus true
|
||||||
:secure-text-entry true
|
:secure-text-entry true
|
||||||
:error (when (pos? (count error)) (i18n/label :t/wrong-password))}]]
|
:error (when (pos? (count error)) (i18n/label :t/wrong-password))}]]
|
||||||
[view {:margin-top 16}
|
[view {:margin-top 16}
|
||||||
[touchable-highlight {:on-press #(do
|
[touchable-highlight {:on-press #(login-account password-text-input address password)}
|
||||||
(.blur @password-text-input)
|
|
||||||
(dispatch [:login-account address password]))}
|
|
||||||
[view st/sign-in-button
|
[view st/sign-in-button
|
||||||
[text {:style st/sign-it-text} (i18n/label :t/sign-in)]]]]]
|
[text {:style st/sign-it-text} (i18n/label :t/sign-in)]]]]]
|
||||||
(when processing
|
(when processing
|
||||||
|
|
Loading…
Reference in New Issue