Increased chat icon tapping area
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
parent
2d6d7d1327
commit
8d9675154c
|
@ -1,8 +1,6 @@
|
|||
(ns status-im.chat.styles.input.input
|
||||
(:require-macros [status-im.utils.styles :refer [defstyle defnstyle]])
|
||||
(:require [status-im.ui.components.styles :as common]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.utils.platform :as platform]))
|
||||
(:require [status-im.ui.components.colors :as colors]))
|
||||
|
||||
(def min-input-height 36)
|
||||
(def padding-vertical 8)
|
||||
|
@ -10,7 +8,7 @@
|
|||
(def max-input-height (* 4 min-input-height))
|
||||
|
||||
(defnstyle root [margin-bottom]
|
||||
{:background-color common/color-white
|
||||
{:background-color colors/white
|
||||
:margin-bottom margin-bottom
|
||||
:flex-direction :column
|
||||
:border-top-width border-height
|
||||
|
@ -20,8 +18,7 @@
|
|||
(def input-container
|
||||
{:flex-direction :row
|
||||
:align-items :flex-end
|
||||
:padding-left 14
|
||||
:padding-right 14})
|
||||
:padding-left 14})
|
||||
|
||||
(def input-root
|
||||
{:padding-top padding-vertical
|
||||
|
@ -93,7 +90,7 @@
|
|||
:left left}})
|
||||
|
||||
(def input-commands-icon
|
||||
{:margin-bottom 14
|
||||
{:margin 14
|
||||
:height 24
|
||||
:width 24})
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
:width 30
|
||||
:height 30
|
||||
:border-radius 15
|
||||
:margin 10
|
||||
:padding 4
|
||||
:margin-left 8
|
||||
:margin-bottom 11
|
||||
|
@ -13,4 +14,4 @@
|
|||
|
||||
(def send-message-icon
|
||||
{:height 22
|
||||
:width 22})
|
||||
:width 22})
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
arg-pos [:current-chat-argument-position]
|
||||
seq-arg-input-text [:chat :seq-argument-input-text]]
|
||||
(when (get-in command [:command :sequential-params])
|
||||
(let [{:keys [placeholder hidden type]} (get-in command [:command :params arg-pos])]
|
||||
(let [{:keys [placeholder type]} (get-in command [:command :params arg-pos])]
|
||||
[react/text-input (merge {:ref #(re-frame/dispatch [:set-chat-ui-props {:seq-input-ref %}])
|
||||
:style (style/seq-input-text command-width container-width)
|
||||
:default-value (or seq-arg-input-text "")
|
||||
|
@ -174,9 +174,9 @@
|
|||
(re-frame/dispatch [:set-chat-ui-props {:input-height h}])))}
|
||||
[react/view {:style style/input-container}
|
||||
[input-view {:single-line-input? single-line-input?}]
|
||||
(when (string/blank? input-text)
|
||||
[commands-button])
|
||||
[send-button/send-button-view]]])))
|
||||
(if (string/blank? input-text)
|
||||
[commands-button]
|
||||
[send-button/send-button-view])]])))
|
||||
|
||||
(defn container []
|
||||
[react/view
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
(ns status-im.chat.views.input.send-button
|
||||
(:require-macros [status-im.utils.views :refer [defview letsubs]])
|
||||
(:require [clojure.string :as string]
|
||||
[reagent.core :as reagent]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.chat.styles.input.send-button :as style]
|
||||
[status-im.ui.components.animation :as animation]
|
||||
|
@ -9,7 +8,7 @@
|
|||
[status-im.ui.components.icons.vector-icons :as vi]
|
||||
[status-im.utils.utils :as utils]))
|
||||
|
||||
(defn send-button-view-on-update [{:keys [spin-value opacity-value command-completion]}]
|
||||
(defn send-button-view-on-update [{:keys [spin-value command-completion]}]
|
||||
(fn [_]
|
||||
(let [to-spin-value (if (some #{:complete :no-command} [@command-completion]) 1 0)]
|
||||
(animation/start
|
||||
|
@ -44,4 +43,4 @@
|
|||
{:style (style/send-message-container spin)
|
||||
:accessibility-label :send-message-button}
|
||||
[vi/icon :icons/input-send {:container-style style/send-message-icon
|
||||
:color :white}]])]))))
|
||||
:color :white}]])]))))
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
(handlers/register-handler-fx
|
||||
:my-profile.drawer/edit-name
|
||||
(fn [{:keys [db]} _]
|
||||
(let [{:my-profile/keys [default-name edit auto-save]} db
|
||||
(let [{:my-profile/keys [default-name]} db
|
||||
{:keys [name public-key]} (get-current-account db)]
|
||||
{:db (cond-> db
|
||||
(not default-name) (assoc :my-profile/default-name (gfycat/generate-gfy public-key))
|
||||
|
|
Loading…
Reference in New Issue