mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 19:44:47 +00:00
reformat status-im.ui.* namespaces
This commit is contained in:
parent
6c620728da
commit
6fc03fc217
@ -16,7 +16,6 @@
|
|||||||
:align-items :center
|
:align-items :center
|
||||||
:padding-horizontal 12})
|
:padding-horizontal 12})
|
||||||
|
|
||||||
|
|
||||||
(defn- border [position]
|
(defn- border [position]
|
||||||
(let [radius (if platform/ios? 8 4)]
|
(let [radius (if platform/ios? 8 4)]
|
||||||
(case position
|
(case position
|
||||||
@ -53,7 +52,6 @@
|
|||||||
{:android {:opacity 0.4}
|
{:android {:opacity 0.4}
|
||||||
:ios {:opacity 0.6}})
|
:ios {:opacity 0.6}})
|
||||||
|
|
||||||
|
|
||||||
(defstyle button-borders
|
(defstyle button-borders
|
||||||
{:border-radius 8
|
{:border-radius 8
|
||||||
:ios {;; Border radius is ignored with transparent background unless overflow "hidden" is used
|
:ios {;; Border radius is ignored with transparent background unless overflow "hidden" is used
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
r (js/parseInt (subs hex 0 2) 16)
|
r (js/parseInt (subs hex 0 2) 16)
|
||||||
g (js/parseInt (subs hex 2 4) 16)
|
g (js/parseInt (subs hex 2 4) 16)
|
||||||
b (js/parseInt (subs hex 4 6) 16)]
|
b (js/parseInt (subs hex 4 6) 16)]
|
||||||
(str "rgba(" r "," g "," b "," opacity")")))
|
(str "rgba(" r "," g "," b "," opacity ")")))
|
||||||
|
|
||||||
(def text black)
|
(def text black)
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
[vector-icons/icon icon (merge icon-opts {:style styles/item-icon})]])
|
[vector-icons/icon icon (merge icon-opts {:style styles/item-icon})]])
|
||||||
|
|
||||||
(defn item-image
|
(defn item-image
|
||||||
[{:keys[source style image-style]}]
|
[{:keys [source style image-style]}]
|
||||||
[react/view {:style style}
|
[react/view {:style style}
|
||||||
[react/image {:source source
|
[react/image {:source source
|
||||||
:style (merge styles/item-image image-style)}]])
|
:style (merge styles/item-image image-style)}]])
|
||||||
@ -203,7 +203,6 @@
|
|||||||
label]
|
label]
|
||||||
item-icon-forward]]])
|
item-icon-forward]]])
|
||||||
|
|
||||||
|
|
||||||
(defn action-list [actions {:keys [container-style action-separator-style] :as styles}]
|
(defn action-list [actions {:keys [container-style action-separator-style] :as styles}]
|
||||||
[react/view (merge styles/action-list container-style)
|
[react/view (merge styles/action-list container-style)
|
||||||
[flat-list
|
[flat-list
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
[status-im.utils.handlers-macro :as handlers-macro]
|
[status-im.utils.handlers-macro :as handlers-macro]
|
||||||
[status-im.transport.message.v1.contact :as message.contact]))
|
[status-im.transport.message.v1.contact :as message.contact]))
|
||||||
|
|
||||||
|
|
||||||
(defn account-update
|
(defn account-update
|
||||||
"Takes effects (containing :db) + new account fields, adds all effects necessary for account update.
|
"Takes effects (containing :db) + new account fields, adds all effects necessary for account update.
|
||||||
Optionally, one can specify event to be dispatched after fields are persisted."
|
Optionally, one can specify event to be dispatched after fields are persisted."
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
:on-press #(when click-handler
|
:on-press #(when click-handler
|
||||||
(click-handler row action params))}]))
|
(click-handler row action params))}]))
|
||||||
|
|
||||||
|
|
||||||
(defview contact-list-modal []
|
(defview contact-list-modal []
|
||||||
(letsubs [contacts [:all-added-people-contacts]
|
(letsubs [contacts [:all-added-people-contacts]
|
||||||
click-handler [:get :contacts/click-handler]
|
click-handler [:get :contacts/click-handler]
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
:data-store/save-contact contact-props}
|
:data-store/save-contact contact-props}
|
||||||
(chat.models/upsert-chat chat-props)))))
|
(chat.models/upsert-chat chat-props)))))
|
||||||
|
|
||||||
|
|
||||||
(defn- update-contact [{:keys [whisper-identity] :as contact} {:keys [db]}]
|
(defn- update-contact [{:keys [whisper-identity] :as contact} {:keys [db]}]
|
||||||
(when (get-in db [:contacts/contacts whisper-identity])
|
(when (get-in db [:contacts/contacts whisper-identity])
|
||||||
{:db (update-in db [:contacts/contacts whisper-identity] merge contact)
|
{:db (update-in db [:contacts/contacts whisper-identity] merge contact)
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
;;Contacts ui props
|
;;Contacts ui props
|
||||||
(spec/def :contacts-ui/edit? boolean?)
|
(spec/def :contacts-ui/edit? boolean?)
|
||||||
|
|
||||||
|
|
||||||
(spec/def :contacts/contacts (spec/nilable (spec/map-of :global/not-empty-string :contact/contact)))
|
(spec/def :contacts/contacts (spec/nilable (spec/map-of :global/not-empty-string :contact/contact)))
|
||||||
;public key of new contact during adding this new contact
|
;public key of new contact during adding this new contact
|
||||||
(spec/def :contacts/new-identity (spec/nilable string?))
|
(spec/def :contacts/new-identity (spec/nilable string?))
|
||||||
|
@ -157,10 +157,10 @@
|
|||||||
text (.-text native-event)]
|
text (.-text native-event)]
|
||||||
(re-frame/dispatch [:set-chat-input-text text])))}]]
|
(re-frame/dispatch [:set-chat-input-text text])))}]]
|
||||||
[react/touchable-highlight {:on-press (fn []
|
[react/touchable-highlight {:on-press (fn []
|
||||||
(js/setTimeout #(do (.clear @inp-ref)(.focus @inp-ref)) 200)
|
(js/setTimeout #(do (.clear @inp-ref) (.focus @inp-ref)) 200)
|
||||||
(re-frame/dispatch [:send-current-message]))}
|
(re-frame/dispatch [:send-current-message]))}
|
||||||
[react/view {:style {:margin-left 16 :width 30 :height 30 :border-radius 15 :background-color "#eef2f5" :align-items :center
|
[react/view {:style {:margin-left 16 :width 30 :height 30 :border-radius 15 :background-color "#eef2f5" :align-items :center
|
||||||
:justify-content :center :transform [{ :rotate "90deg"}]}}
|
:justify-content :center :transform [{:rotate "90deg"}]}}
|
||||||
[icons/icon :icons/arrow-left]]]]]))
|
[icons/icon :icons/arrow-left]]]]]))
|
||||||
|
|
||||||
(views/defview chat-view []
|
(views/defview chat-view []
|
||||||
|
@ -200,7 +200,6 @@
|
|||||||
(fn [{:keys [title content confirm-button-text on-accept on-cancel]}]
|
(fn [{:keys [title content confirm-button-text on-accept on-cancel]}]
|
||||||
(utils/show-confirmation title content confirm-button-text on-accept on-cancel)))
|
(utils/show-confirmation title content confirm-button-text on-accept on-cancel)))
|
||||||
|
|
||||||
|
|
||||||
(re-frame/reg-fx
|
(re-frame/reg-fx
|
||||||
:close-application
|
:close-application
|
||||||
(fn [_]
|
(fn [_]
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
[status-im.utils.handlers :as handlers]
|
[status-im.utils.handlers :as handlers]
|
||||||
[status-im.utils.handlers-macro :as handlers-macro]))
|
[status-im.utils.handlers-macro :as handlers-macro]))
|
||||||
|
|
||||||
|
|
||||||
;;;; Handlers
|
;;;; Handlers
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
|
@ -30,6 +30,5 @@
|
|||||||
:onPanResponderRelease (on-release animated-offset-x end-offset-x chat-id swiped?)
|
:onPanResponderRelease (on-release animated-offset-x end-offset-x chat-id swiped?)
|
||||||
:onPanResponderTerminate (on-release animated-offset-x end-offset-x chat-id swiped?)})))
|
:onPanResponderTerminate (on-release animated-offset-x end-offset-x chat-id swiped?)})))
|
||||||
|
|
||||||
|
|
||||||
(defn pan-handlers [pan-responder]
|
(defn pan-handlers [pan-responder]
|
||||||
(js->clj (.-panHandlers pan-responder)))
|
(js->clj (.-panHandlers pan-responder)))
|
@ -185,4 +185,3 @@
|
|||||||
:font-size 15
|
:font-size 15
|
||||||
:letter-spacing -0.2})
|
:letter-spacing -0.2})
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
{:gas (ethereum/estimate-gas symbol)
|
{:gas (ethereum/estimate-gas symbol)
|
||||||
:symbol symbol}))
|
:symbol symbol}))
|
||||||
|
|
||||||
|
|
||||||
(defmethod navigation/preload-data! :wallet-request-transaction
|
(defmethod navigation/preload-data! :wallet-request-transaction
|
||||||
[db [event]]
|
[db [event]]
|
||||||
(if (= event :navigate-back)
|
(if (= event :navigate-back)
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
transaction
|
transaction
|
||||||
(assoc transaction :symbol :ETH)))))
|
(assoc transaction :symbol :ETH)))))
|
||||||
|
|
||||||
|
|
||||||
(re-frame/reg-sub :wallet.send/symbol
|
(re-frame/reg-sub :wallet.send/symbol
|
||||||
:<- [::send-transaction]
|
:<- [::send-transaction]
|
||||||
(fn [send-transaction]
|
(fn [send-transaction]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user