From a714cc9e666674d757afe2379f9bd7e14b8c4995 Mon Sep 17 00:00:00 2001 From: virvar Date: Mon, 25 Apr 2016 12:25:33 +0300 Subject: [PATCH] Fix #27 Confirmation code should be number input Former-commit-id: 55396a20c450c475cc1e216a3b891f37823b4b76 --- src/syng_im/components/chat/chat_message_new.cljs | 2 ++ src/syng_im/components/chat/input/confirmation_code.cljs | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/syng_im/components/chat/input/confirmation_code.cljs diff --git a/src/syng_im/components/chat/chat_message_new.cljs b/src/syng_im/components/chat/chat_message_new.cljs index fc72754011..8f29549432 100644 --- a/src/syng_im/components/chat/chat_message_new.cljs +++ b/src/syng_im/components/chat/chat_message_new.cljs @@ -11,6 +11,7 @@ [syng-im.components.chat.input.simple-command :refer [simple-command-input-view]] [syng-im.components.chat.input.phone :refer [phone-input-view]] [syng-im.components.chat.input.password :refer [password-input-view]] + [syng-im.components.chat.input.confirmation-code :refer [confirmation-code-input-view]] [syng-im.components.chat.input.money :refer [money-input-view]] [syng-im.components.chat.input.simple-command-staged :refer [simple-command-staged-view]] [syng-im.utils.utils :refer [log toast http-post]] @@ -33,6 +34,7 @@ (case (:command command) :phone [phone-input-view command] :keypair-password [password-input-view command] + :confirmation-code [confirmation-code-input-view command] :money [money-input-view command] :request [money-input-view command] [default-command-input-view command])) diff --git a/src/syng_im/components/chat/input/confirmation_code.cljs b/src/syng_im/components/chat/input/confirmation_code.cljs new file mode 100644 index 0000000000..a1f1fca549 --- /dev/null +++ b/src/syng_im/components/chat/input/confirmation_code.cljs @@ -0,0 +1,9 @@ +(ns syng-im.components.chat.input.confirmation-code + (:require + [re-frame.core :refer [subscribe dispatch dispatch-sync]] + [syng-im.components.chat.input.simple-command :refer [simple-command-input-view]] + [syng-im.utils.utils :refer [log toast http-post]] + [syng-im.utils.logging :as log])) + +(defn confirmation-code-input-view [command] + [simple-command-input-view command {:keyboardType "numeric"}])