File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11(ns status-im.chat.styles.input.input
22 (:require-macros [status-im.utils.styles :refer [defstyle defnstyle ]])
3- (:require [status-im.ui.components.styles :as common]
4- [status-im.ui.components.colors :as colors]
5- [status-im.utils.platform :as platform]))
3+ (:require [status-im.ui.components.colors :as colors]))
64
75(def min-input-height 36 )
86(def padding-vertical 8 )
97(def border-height 1 )
108(def max-input-height (* 4 min-input-height))
119
1210(defnstyle root [margin-bottom]
13- {:background-color common/color- white
11+ {:background-color colors/ white
1412 :margin-bottom margin-bottom
1513 :flex-direction :column
1614 :border-top-width border-height
2018(def input-container
2119 {:flex-direction :row
2220 :align-items :flex-end
23- :padding-left 14
24- :padding-right 14 })
21+ :padding-left 14 })
2522
2623(def input-root
2724 {:padding-top padding-vertical
9390 :left left}})
9491
9592(def input-commands-icon
96- {:margin-bottom 14
93+ {:margin 14
9794 :height 24
9895 :width 24 })
9996
Original file line number Diff line number Diff line change 66 :width 30
77 :height 30
88 :border-radius 15
9+ :margin 10
910 :padding 4
1011 :margin-left 8
1112 :margin-bottom 11
1213 :transform [{:rotate rotation}]})
1314
1415(def send-message-icon
1516 {:height 22
16- :width 22 })
17+ :width 22 })
Original file line number Diff line number Diff line change 113113 arg-pos [:current-chat-argument-position ]
114114 seq-arg-input-text [:chat :seq-argument-input-text ]]
115115 (when (get-in command [:command :sequential-params ])
116- (let [{:keys [placeholder hidden type]} (get-in command [:command :params arg-pos])]
116+ (let [{:keys [placeholder type]} (get-in command [:command :params arg-pos])]
117117 [react/text-input (merge {:ref #(re-frame/dispatch [:set-chat-ui-props {:seq-input-ref %}])
118118 :style (style/seq-input-text command-width container-width)
119119 :default-value (or seq-arg-input-text " " )
174174 (re-frame/dispatch [:set-chat-ui-props {:input-height h}])))}
175175 [react/view {:style style/input-container}
176176 [input-view {:single-line-input? single-line-input?}]
177- (when (string/blank? input-text)
178- [commands-button])
179- [send-button/send-button-view]]])))
177+ (if (string/blank? input-text)
178+ [commands-button]
179+ [send-button/send-button-view]) ]])))
180180
181181(defn container []
182182 [react/view
Original file line number Diff line number Diff line change 11(ns status-im.chat.views.input.send-button
22 (:require-macros [status-im.utils.views :refer [defview letsubs]])
33 (:require [clojure.string :as string]
4- [reagent.core :as reagent]
54 [re-frame.core :as re-frame]
65 [status-im.chat.styles.input.send-button :as style]
76 [status-im.ui.components.animation :as animation]
87 [status-im.ui.components.react :as react]
98 [status-im.ui.components.icons.vector-icons :as vi]
109 [status-im.utils.utils :as utils]))
1110
12- (defn send-button-view-on-update [{:keys [spin-value opacity-value command-completion]}]
11+ (defn send-button-view-on-update [{:keys [spin-value command-completion]}]
1312 (fn [_]
1413 (let [to-spin-value (if (some #{:complete :no-command } [@command-completion]) 1 0 )]
1514 (animation/start
4443 {:style (style/send-message-container spin)
4544 :accessibility-label :send-message-button }
4645 [vi/icon :icons/input-send {:container-style style/send-message-icon
47- :color :white }]])]))))
46+ :color :white }]])]))))
Original file line number Diff line number Diff line change 5151(handlers/register-handler-fx
5252 :my-profile.drawer/edit-name
5353 (fn [{:keys [db]} _]
54- (let [{:my-profile/keys [default-name edit auto-save ]} db
54+ (let [{:my-profile/keys [default-name ]} db
5555 {:keys [name public-key]} (get-current-account db)]
5656 {:db (cond-> db
5757 (not default-name ) (assoc :my-profile/default-name (gfycat/generate-gfy public-key))
You can’t perform that action at this time.
0 commit comments