desktop popup
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
73cbfd4cd9
commit
22167db7a2
|
@ -1,5 +1,3 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||||
<g fill="none" fill-rule="evenodd">
|
<path fill="" fill-rule="nonzero" d="M16.0909091,19.7272727 L16.0909091,18.0909091 C16.0909091,15.731147 14.1779439,13.8181818 11.8181818,13.8181818 L5.27272727,13.8181818 C2.91296516,13.8181818 1,15.731147 1,18.0909091 L1,19.7272727 C1,20.2795575 1.44771525,20.7272727 2,20.7272727 C2.55228475,20.7272727 3,20.2795575 3,19.7272727 L3,18.0909091 C3,16.8357165 4.01753466,15.8181818 5.27272727,15.8181818 L11.8181818,15.8181818 C13.0733744,15.8181818 14.0909091,16.8357165 14.0909091,18.0909091 L14.0909091,19.7272727 C14.0909091,20.2795575 14.5386243,20.7272727 15.0909091,20.7272727 C15.6431938,20.7272727 16.0909091,20.2795575 16.0909091,19.7272727 Z M8.54545455,10.5454545 C9.80064716,10.5454545 10.8181818,9.52791989 10.8181818,8.27272727 C10.8181818,7.01753466 9.80064716,6 8.54545455,6 C7.29026193,6 6.27272727,7.01753466 6.27272727,8.27272727 C6.27272727,9.52791989 7.29026193,10.5454545 8.54545455,10.5454545 Z M18,11 L18,9.00292933 C18,8.44902676 18.6474695,8 18.9255371,8 C19.2016795,8 19.9146729,8.43788135 19.9146729,9.00292933 L19.9146729,11 L21.6942142,11 C22.2481168,11 22.6971436,11.4438648 22.6971436,12 C22.6971436,12.5522847 22.2592622,13 21.6942142,13 L19.9146729,13 L19.9146729,15 C19.9146729,15.5539026 19.2036047,16.0029293 18.9255371,16.0029293 C18.6493947,16.0029293 18,15.565048 18,15 L18,13 L16.0029293,13 C15.4490268,13 15,12.5561352 15,12 C15,11.4477153 15.4378814,11 16.0029293,11 L18,11 Z M8.54545455,12.5454545 C6.18569243,12.5454545 4.27272727,10.6324894 4.27272727,8.27272727 C4.27272727,5.91296516 6.18569243,4 8.54545455,4 C10.9052167,4 12.8181818,5.91296516 12.8181818,8.27272727 C12.8181818,10.6324894 10.9052167,12.5454545 8.54545455,12.5454545 Z"/>
|
||||||
<path fill="" fill-rule="nonzero" d="M16.0909091,19.7272727 L16.0909091,18.0909091 C16.0909091,15.731147 14.1779439,13.8181818 11.8181818,13.8181818 L5.27272727,13.8181818 C2.91296516,13.8181818 1,15.731147 1,18.0909091 L1,19.7272727 C1,20.2795575 1.44771525,20.7272727 2,20.7272727 C2.55228475,20.7272727 3,20.2795575 3,19.7272727 L3,18.0909091 C3,16.8357165 4.01753466,15.8181818 5.27272727,15.8181818 L11.8181818,15.8181818 C13.0733744,15.8181818 14.0909091,16.8357165 14.0909091,18.0909091 L14.0909091,19.7272727 C14.0909091,20.2795575 14.5386243,20.7272727 15.0909091,20.7272727 C15.6431938,20.7272727 16.0909091,20.2795575 16.0909091,19.7272727 Z M8.54545455,10.5454545 C9.80064716,10.5454545 10.8181818,9.52791989 10.8181818,8.27272727 C10.8181818,7.01753466 9.80064716,6 8.54545455,6 C7.29026193,6 6.27272727,7.01753466 6.27272727,8.27272727 C6.27272727,9.52791989 7.29026193,10.5454545 8.54545455,10.5454545 Z M18,11 L18,9.00292933 C18,8.44902676 18.6474695,8 18.9255371,8 C19.2016795,8 19.9146729,8.43788135 19.9146729,9.00292933 L19.9146729,11 L21.6942142,11 C22.2481168,11 22.6971436,11.4438648 22.6971436,12 C22.6971436,12.5522847 22.2592622,13 21.6942142,13 L19.9146729,13 L19.9146729,15 C19.9146729,15.5539026 19.2036047,16.0029293 18.9255371,16.0029293 C18.6493947,16.0029293 18,15.565048 18,15 L18,13 L16.0029293,13 C15.4490268,13 15,12.5561352 15,12 C15,11.4477153 15.4378814,11 16.0029293,11 L18,11 Z M8.54545455,12.5454545 C6.18569243,12.5454545 4.27272727,10.6324894 4.27272727,8.27272727 C4.27272727,5.91296516 6.18569243,4 8.54545455,4 C10.9052167,4 12.8181818,5.91296516 12.8181818,8.27272727 C12.8181818,10.6324894 10.9052167,12.5454545 8.54545455,12.5454545 Z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -8,8 +8,8 @@
|
||||||
[rn/touchable-highlight (merge {:on-press on-press}
|
[rn/touchable-highlight (merge {:on-press on-press}
|
||||||
(when accessibility-label
|
(when accessibility-label
|
||||||
{:accessibility-label accessibility-label}))
|
{:accessibility-label accessibility-label}))
|
||||||
[rn/view st/action-button
|
[rn/view {:style st/action-button}
|
||||||
[rn/view (st/action-button-icon-container cyrcle-color)
|
[rn/view {:style (st/action-button-icon-container cyrcle-color)}
|
||||||
[vi/icon icon icon-opts]]
|
[vi/icon icon icon-opts]]
|
||||||
[rn/view st/action-button-label-container
|
[rn/view st/action-button-label-container
|
||||||
[rn/text {:style (merge st/action-button-label label-style)}
|
[rn/text {:style (merge st/action-button-label label-style)}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:align-items :center
|
:align-items :center
|
||||||
:ios {:height 63}
|
:ios {:height 63}
|
||||||
|
:desktop {:height 50}
|
||||||
:android {:height 56}})
|
:android {:height 56}})
|
||||||
|
|
||||||
(defnstyle action-button-icon-container [circle-color]
|
(defnstyle action-button-icon-container [circle-color]
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
(ns status-im.ui.screens.desktop.main.add-new.styles
|
(ns status-im.ui.screens.desktop.main.add-new.styles
|
||||||
(:require [status-im.ui.components.colors :as colors]))
|
(:require [status-im.ui.components.colors :as colors]))
|
||||||
|
|
||||||
(def new-contact-view
|
(def new-view
|
||||||
{:flex 1
|
{:flex 1
|
||||||
:background-color colors/white
|
:background-color colors/white
|
||||||
:margin-left 24
|
:margin-left 16
|
||||||
:margin-right 37})
|
:margin-right 24})
|
||||||
|
|
||||||
(def new-contact-title
|
(def new-contact-title
|
||||||
{:height 64
|
{:height 64
|
||||||
|
@ -14,15 +14,12 @@
|
||||||
|
|
||||||
(def new-contact-title-text
|
(def new-contact-title-text
|
||||||
{:font-size 20
|
{:font-size 20
|
||||||
|
:font-weight :bold
|
||||||
:color :black})
|
:color :black})
|
||||||
|
|
||||||
(def new-contact-subtitle
|
(def new-contact-subtitle
|
||||||
{:font-size 14})
|
{:font-size 14})
|
||||||
|
|
||||||
(def new-contact-separator
|
|
||||||
{:height 1
|
|
||||||
:background-color colors/gray-light})
|
|
||||||
|
|
||||||
(def add-contact-edit-view
|
(def add-contact-edit-view
|
||||||
{:height 45
|
{:height 45
|
||||||
:margin-bottom 32
|
:margin-bottom 32
|
||||||
|
@ -32,7 +29,8 @@
|
||||||
:margin-top 16})
|
:margin-top 16})
|
||||||
|
|
||||||
(defn add-contact-input [error?]
|
(defn add-contact-input [error?]
|
||||||
(cond-> {:font-size 14
|
(cond-> {:flex 1
|
||||||
|
:font-size 14
|
||||||
:background-color colors/gray-lighter
|
:background-color colors/gray-lighter
|
||||||
:margin-right 12
|
:margin-right 12
|
||||||
:border-radius 8}
|
:border-radius 8}
|
||||||
|
|
|
@ -14,19 +14,6 @@
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.ui.components.colors :as colors]))
|
[status-im.ui.components.colors :as colors]))
|
||||||
|
|
||||||
(def group-chat-section
|
|
||||||
^{:key "groupchat"}
|
|
||||||
[react/view {:style styles/new-contact-title}
|
|
||||||
[react/text {:style styles/new-contact-title-text
|
|
||||||
:font :medium}
|
|
||||||
(i18n/label :new-group-chat)]
|
|
||||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:contact.ui/start-group-chat-pressed])}
|
|
||||||
[react/view
|
|
||||||
{:style (styles/add-contact-button nil)}
|
|
||||||
[react/text
|
|
||||||
{:style (styles/add-contact-button-text nil)}
|
|
||||||
(i18n/label :start-chat)]]]])
|
|
||||||
|
|
||||||
(defn topic-input-placeholder []
|
(defn topic-input-placeholder []
|
||||||
[react/text {:style styles/topic-placeholder} "#"])
|
[react/text {:style styles/topic-placeholder} "#"])
|
||||||
|
|
||||||
|
@ -37,97 +24,106 @@
|
||||||
text]]
|
text]]
|
||||||
[react/view {:style styles/tooltip-triangle}]])
|
[react/view {:style styles/tooltip-triangle}]])
|
||||||
|
|
||||||
(views/defview new-contact []
|
(views/defview new-one-to-one []
|
||||||
(views/letsubs [new-contact-identity [:get :contacts/new-identity]
|
(views/letsubs [new-contact-identity [:get :contacts/new-identity]
|
||||||
contacts [:contacts/all-added-people-contacts]
|
contacts [:contacts/all-added-people-contacts]
|
||||||
chat-error [:new-identity-error]
|
chat-error [:new-identity-error]]
|
||||||
topic [:get :public-group-topic]
|
|
||||||
topic-error [:public-chat.new/topic-error-message]]
|
|
||||||
{:component-will-unmount #(re-frame/dispatch [:new-chat/set-new-identity nil])}
|
{:component-will-unmount #(re-frame/dispatch [:new-chat/set-new-identity nil])}
|
||||||
[react/scroll-view
|
[react/view {:style styles/new-view}
|
||||||
[react/view {:style styles/new-contact-view}
|
[react/view {:style styles/new-contact-title}
|
||||||
^{:key "newcontact"}
|
[react/text {:style styles/new-contact-title-text
|
||||||
[react/view {:style styles/new-contact-title}
|
:font :medium}
|
||||||
[react/text {:style styles/new-contact-title-text
|
(i18n/label :new-chat)]]
|
||||||
:font :medium}
|
[react/text {:style styles/new-contact-subtitle} (i18n/label :enter-ens-or-contact-code)]
|
||||||
(i18n/label :new-chat)]]
|
(let [disable? (or (not (string/blank? chat-error))
|
||||||
[react/text {:style styles/new-contact-subtitle} (i18n/label :contact-code)]
|
(string/blank? new-contact-identity))
|
||||||
[react/view {:style styles/new-contact-separator}]
|
show-error-tooltip? (and chat-error
|
||||||
(let [disable? (or (not (string/blank? chat-error))
|
(not (string/blank? new-contact-identity)))
|
||||||
(string/blank? new-contact-identity))
|
create-1to1-chat #(re-frame/dispatch [:contact.ui/contact-code-submitted new-contact-identity])]
|
||||||
show-error-tooltip? (and chat-error
|
[react/view {:style styles/add-contact-edit-view}
|
||||||
(not (string/blank? new-contact-identity)))
|
[react/view {:style (styles/add-contact-input show-error-tooltip?)}
|
||||||
create-1to1-chat #(re-frame/dispatch [:contact.ui/contact-code-submitted new-contact-identity])]
|
(when show-error-tooltip?
|
||||||
[react/view {:style styles/add-contact-edit-view}
|
[error-tooltip chat-error])
|
||||||
[react/view {:flex 1
|
[react/text-input {:placeholder "name.stateofus.eth"
|
||||||
:style (styles/add-contact-input show-error-tooltip?)}
|
:flex 1
|
||||||
(when show-error-tooltip?
|
:selection-color colors/blue
|
||||||
[error-tooltip chat-error])
|
:font :default
|
||||||
[react/text-input {:placeholder "0x..."
|
:on-change (fn [e]
|
||||||
:flex 1
|
(let [native-event (.-nativeEvent e)
|
||||||
:selection-color colors/blue
|
text (.-text native-event)]
|
||||||
:font :default
|
(re-frame/dispatch [:new-chat/set-new-identity text])))
|
||||||
:on-change (fn [e]
|
:on-submit-editing (when-not disable? create-1to1-chat)}]]
|
||||||
(let [native-event (.-nativeEvent e)
|
[react/touchable-highlight {:disabled disable? :on-press create-1to1-chat}
|
||||||
text (.-text native-event)]
|
[react/view
|
||||||
(re-frame/dispatch [:new-chat/set-new-identity text])))
|
{:style (styles/add-contact-button disable?)}
|
||||||
:on-submit-editing (when-not disable? create-1to1-chat)}]]
|
[react/text
|
||||||
[react/touchable-highlight {:disabled disable? :on-press create-1to1-chat}
|
{:style (styles/add-contact-button-text disable?)}
|
||||||
[react/view
|
(i18n/label :start-chat)]]]])
|
||||||
{:style (styles/add-contact-button disable?)}
|
(when (seq contacts) [react/text {:style styles/new-contact-subtitle} (i18n/label :or-choose-a-contact)])
|
||||||
[react/text
|
[react/scroll-view
|
||||||
{:style (styles/add-contact-button-text disable?)}
|
[react/view {:style styles/suggested-contacts}
|
||||||
(i18n/label :start-chat)]]]])
|
(doall
|
||||||
^{:key "choosecontact"}
|
(for [c contacts]
|
||||||
[react/view
|
^{:key (:public-key c)}
|
||||||
(when (seq contacts) [react/text {:style styles/new-contact-subtitle} (i18n/label :or-choose-a-contact)])
|
[react/touchable-highlight {:on-press #(do
|
||||||
[react/view {:style styles/suggested-contacts}
|
(re-frame/dispatch [:set :contacts/new-identity (:public-key c)])
|
||||||
(doall
|
(re-frame/dispatch [:contact.ui/contact-code-submitted (:public-key c)]))}
|
||||||
(for [c contacts]
|
[react/view {:style styles/suggested-contact-view}
|
||||||
^{:key (:public-key c)}
|
[react/image {:style styles/suggested-contact-image
|
||||||
[react/touchable-highlight {:on-press #(do
|
:source {:uri (:photo-path c)}}]
|
||||||
(re-frame/dispatch [:set :contacts/new-identity (:public-key c)])
|
[react/text {:style styles/new-contact-subtitle} (:name c)]]]))]]]))
|
||||||
(re-frame/dispatch [:contact.ui/contact-code-submitted (:public-key c)]))}
|
|
||||||
[react/view {:style styles/suggested-contact-view}
|
|
||||||
[react/image {:style styles/suggested-contact-image
|
|
||||||
:source {:uri (:photo-path c)}}]
|
|
||||||
[react/text {:style styles/new-contact-subtitle} (:name c)]]]))]]
|
|
||||||
(when config/group-chats-enabled? group-chat-section)
|
|
||||||
^{:key "publicchat"}
|
|
||||||
[react/view {:style styles/new-contact-title}
|
|
||||||
[react/text {:style styles/new-contact-title-text
|
|
||||||
:font :medium}
|
|
||||||
(i18n/label :new-public-group-chat)]]
|
|
||||||
[react/text {:style styles/new-contact-subtitle} (i18n/label :public-group-topic)]
|
|
||||||
[react/view {:style styles/new-contact-separator}]
|
|
||||||
(let [disable? (or topic-error
|
|
||||||
(string/blank? topic))
|
|
||||||
show-error-tooltip? topic-error
|
|
||||||
create-public-chat #(when (public-chat.db/valid-topic? topic)
|
|
||||||
(re-frame/dispatch [:set :public-group-topic nil])
|
|
||||||
(re-frame/dispatch [:chat.ui/start-public-chat topic {:navigation-reset? true}]))]
|
|
||||||
[react/view {:style styles/add-contact-edit-view}
|
|
||||||
[react/view {:flex 1
|
|
||||||
:style (styles/add-pub-chat-input show-error-tooltip?)}
|
|
||||||
(when show-error-tooltip?
|
|
||||||
[error-tooltip topic-error])
|
|
||||||
|
|
||||||
[react/text-input {:flex 1
|
(views/defview new-group-chat []
|
||||||
:font :default
|
[react/view {:style styles/new-view}
|
||||||
:selection-color colors/blue
|
[react/view {:style styles/new-contact-title}
|
||||||
:placeholder ""
|
[react/text {:style styles/new-contact-title-text
|
||||||
:on-change (fn [e]
|
:font :medium}
|
||||||
(let [text (.. e -nativeEvent -text)]
|
(i18n/label :new-group-chat)]]
|
||||||
(re-frame/dispatch [:set :public-group-topic text])))
|
[react/touchable-highlight {:on-press #(re-frame/dispatch [:contact.ui/start-group-chat-pressed])}
|
||||||
:on-submit-editing (when-not disable?
|
[react/view
|
||||||
create-public-chat)}]]
|
{:style (styles/add-contact-button nil)}
|
||||||
[react/touchable-highlight {:disabled disable?
|
[react/text
|
||||||
:on-press create-public-chat}
|
{:style (styles/add-contact-button-text nil)}
|
||||||
[react/view {:style (styles/add-contact-button disable?)}
|
(i18n/label :start-chat)]]]])
|
||||||
[react/text {:style (styles/add-contact-button-text disable?)}
|
|
||||||
(i18n/label :new-public-group-chat)]]]])
|
(views/defview new-public-chat []
|
||||||
[topic-input-placeholder]
|
(views/letsubs [topic [:get :public-group-topic]
|
||||||
[react/text {:style styles/new-contact-subtitle} (i18n/label :selected-for-you)]
|
topic-error [:public-chat.new/topic-error-message]]
|
||||||
|
[react/view {:style styles/new-view}
|
||||||
|
[react/view {:style styles/new-contact-title}
|
||||||
|
[react/text {:style styles/new-contact-title-text
|
||||||
|
:font :medium}
|
||||||
|
(i18n/label :new-public-group-chat)]]
|
||||||
|
[react/text {:style styles/new-contact-subtitle} (i18n/label :public-group-topic)]
|
||||||
|
(let [disable? (or topic-error
|
||||||
|
(string/blank? topic))
|
||||||
|
show-error-tooltip? topic-error
|
||||||
|
create-public-chat #(when (public-chat.db/valid-topic? topic)
|
||||||
|
(re-frame/dispatch [:set :public-group-topic nil])
|
||||||
|
(re-frame/dispatch [:chat.ui/start-public-chat topic {:navigation-reset? true}]))]
|
||||||
|
[react/view {:style styles/add-contact-edit-view}
|
||||||
|
[react/view {:flex 1
|
||||||
|
:style (styles/add-pub-chat-input show-error-tooltip?)}
|
||||||
|
(when show-error-tooltip?
|
||||||
|
[error-tooltip topic-error])
|
||||||
|
|
||||||
|
[react/text-input {:flex 1
|
||||||
|
:font :default
|
||||||
|
:selection-color colors/blue
|
||||||
|
:placeholder ""
|
||||||
|
:on-change (fn [e]
|
||||||
|
(let [text (.. e -nativeEvent -text)]
|
||||||
|
(re-frame/dispatch [:set :public-group-topic text])))
|
||||||
|
:on-submit-editing (when-not disable?
|
||||||
|
create-public-chat)}]]
|
||||||
|
[react/touchable-highlight {:disabled disable?
|
||||||
|
:on-press create-public-chat}
|
||||||
|
[react/view {:style (styles/add-contact-button disable?)}
|
||||||
|
[react/text {:style (styles/add-contact-button-text disable?)}
|
||||||
|
(i18n/label :new-public-group-chat)]]]])
|
||||||
|
[topic-input-placeholder]
|
||||||
|
[react/text {:style styles/new-contact-subtitle} (i18n/label :selected-for-you)]
|
||||||
|
[react/scroll-view
|
||||||
[react/view {:style styles/suggested-contacts}
|
[react/view {:style styles/suggested-contacts}
|
||||||
(doall
|
(doall
|
||||||
(for [topic public-chat/default-public-chats]
|
(for [topic public-chat/default-public-chats]
|
||||||
|
|
|
@ -12,3 +12,11 @@
|
||||||
(def pane-separator
|
(def pane-separator
|
||||||
{:width 1
|
{:width 1
|
||||||
:background-color colors/gray-light})
|
:background-color colors/gray-light})
|
||||||
|
|
||||||
|
(def absolute
|
||||||
|
{:position :absolute
|
||||||
|
:top 0
|
||||||
|
:right 0
|
||||||
|
:left 0
|
||||||
|
:bottom 0
|
||||||
|
:flex 1})
|
||||||
|
|
|
@ -90,3 +90,19 @@
|
||||||
(def topic-text
|
(def topic-text
|
||||||
{:font-size 25.6
|
{:font-size 25.6
|
||||||
:color colors/white})
|
:color colors/white})
|
||||||
|
|
||||||
|
(def popup-shaddow
|
||||||
|
{:background-color colors/black-transparent
|
||||||
|
:border-radius 10
|
||||||
|
:margin-top 60
|
||||||
|
:margin-left 120})
|
||||||
|
|
||||||
|
(def popup
|
||||||
|
{:background-color colors/white
|
||||||
|
:padding-right 15
|
||||||
|
:padding-vertical 10
|
||||||
|
:margin-top 1
|
||||||
|
:margin-bottom 4
|
||||||
|
:margin-left 3
|
||||||
|
:margin-right 3
|
||||||
|
:border-radius 10})
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[status-im.utils.utils :as utils]
|
[status-im.utils.utils :as utils]
|
||||||
[status-im.ui.components.react :as components]))
|
[status-im.ui.components.react :as components]
|
||||||
|
[reagent.core :as reagent]
|
||||||
|
[status-im.ui.components.action-button.styles :as action-button.styles]
|
||||||
|
[status-im.ui.components.action-button.action-button :as action-button]
|
||||||
|
[status-im.utils.config :as config]))
|
||||||
|
|
||||||
(views/defview chat-list-item-inner-view [{:keys [chat-id name group-chat color public? public-key] :as chat-item}]
|
(views/defview chat-list-item-inner-view [{:keys [chat-id name group-chat color public? public-key] :as chat-item}]
|
||||||
(views/letsubs [photo-path [:contacts/chat-photo chat-id]
|
(views/letsubs [photo-path [:contacts/chat-photo chat-id]
|
||||||
|
@ -102,6 +106,35 @@
|
||||||
text (.-text native-event)]
|
text (.-text native-event)]
|
||||||
(re-frame/dispatch [:search/filter-changed text])))}]])
|
(re-frame/dispatch [:search/filter-changed text])))}]])
|
||||||
|
|
||||||
|
(defn popup []
|
||||||
|
[react/view {:style {:flex-direction :row}}
|
||||||
|
[react/view {:style styles/popup-shaddow}
|
||||||
|
[react/view {:style styles/popup}
|
||||||
|
[action-button/action-button
|
||||||
|
{:label (i18n/label :t/start-new-chat)
|
||||||
|
:accessibility-label :start-1-1-chat-button
|
||||||
|
:icon :icons/newchat
|
||||||
|
:icon-opts {:color colors/blue}
|
||||||
|
:on-press #(do
|
||||||
|
(re-frame/dispatch [:set-in [:desktop :popup] nil])
|
||||||
|
(re-frame/dispatch [:navigate-to :desktop/new-one-to-one]))}]
|
||||||
|
[action-button/action-button
|
||||||
|
{:label (i18n/label :t/start-group-chat)
|
||||||
|
:accessibility-label :start-group-chat-button
|
||||||
|
:icon :icons/contacts
|
||||||
|
:icon-opts {:color colors/blue}
|
||||||
|
:on-press #(do
|
||||||
|
(re-frame/dispatch [:set-in [:desktop :popup] nil])
|
||||||
|
(re-frame/dispatch [:navigate-to :desktop/new-group-chat]))}]
|
||||||
|
[action-button/action-button
|
||||||
|
{:label (i18n/label :t/new-public-group-chat)
|
||||||
|
:accessibility-label :join-public-chat-button
|
||||||
|
:icon :icons/public
|
||||||
|
:icon-opts {:color colors/blue}
|
||||||
|
:on-press #(do
|
||||||
|
(re-frame/dispatch [:set-in [:desktop :popup] nil])
|
||||||
|
(re-frame/dispatch [:navigate-to :desktop/new-public-chat]))}]]]])
|
||||||
|
|
||||||
(views/defview chat-list-view [loading?]
|
(views/defview chat-list-view [loading?]
|
||||||
(views/letsubs [search-filter [:search/filter]
|
(views/letsubs [search-filter [:search/filter]
|
||||||
filtered-home-items [:search/filtered-home-items]]
|
filtered-home-items [:search/filtered-home-items]]
|
||||||
|
@ -120,10 +153,10 @@
|
||||||
[react/view {:style styles/chat-list-view}
|
[react/view {:style styles/chat-list-view}
|
||||||
[react/view {:style styles/chat-list-header}
|
[react/view {:style styles/chat-list-header}
|
||||||
[search-input search-filter]
|
[search-input search-filter]
|
||||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-to :new-contact])}
|
[react/view
|
||||||
[react/view {:style styles/add-new}
|
[react/touchable-highlight {:on-press #(re-frame/dispatch [:set-in [:desktop :popup] popup])}
|
||||||
[icons/icon :icons/add {:style {:tint-color :white}}]]]]
|
[react/view {:style styles/add-new}
|
||||||
[react/view {:style styles/chat-list-separator}]
|
[icons/icon :icons/add {:style {:tint-color :white}}]]]]]
|
||||||
(if loading?
|
(if loading?
|
||||||
[react/view {:style {:flex 1
|
[react/view {:style {:flex 1
|
||||||
:justify-content :center
|
:justify-content :center
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
[status-im.ui.screens.desktop.main.chat.views :as chat.views]
|
[status-im.ui.screens.desktop.main.chat.views :as chat.views]
|
||||||
[status-im.ui.screens.desktop.main.add-new.views :as add-new.views]
|
[status-im.ui.screens.desktop.main.add-new.views :as add-new.views]
|
||||||
[status-im.ui.components.desktop.tabs :as tabs]
|
[status-im.ui.components.desktop.tabs :as tabs]
|
||||||
[status-im.ui.components.react :as react]))
|
[status-im.ui.components.react :as react]
|
||||||
|
[re-frame.core :as re-frame]))
|
||||||
|
|
||||||
(views/defview status-view []
|
(views/defview status-view []
|
||||||
[react/view {:style {:flex 1 :background-color "#eef2f5" :align-items :center :justify-content :center}}
|
[react/view {:style {:flex 1 :background-color "#eef2f5" :align-items :center :justify-content :center}}
|
||||||
|
@ -22,11 +23,23 @@
|
||||||
[react/view {:style {:flex 1}}
|
[react/view {:style {:flex 1}}
|
||||||
[component]])))
|
[component]])))
|
||||||
|
|
||||||
|
(views/defview popup-view []
|
||||||
|
(views/letsubs [popup [:get-in [:desktop :popup]]]
|
||||||
|
(when popup
|
||||||
|
[react/view {:style styles/absolute}
|
||||||
|
[react/touchable-highlight {:on-press #(re-frame/dispatch [:set-in [:desktop :popup] nil])
|
||||||
|
:style {:flex 1}}
|
||||||
|
[react/view]]
|
||||||
|
[react/view {:style styles/absolute}
|
||||||
|
[popup]]])))
|
||||||
|
|
||||||
(views/defview main-view []
|
(views/defview main-view []
|
||||||
(views/letsubs [view-id [:get :view-id]]
|
(views/letsubs [view-id [:get :view-id]]
|
||||||
(let [component (case view-id
|
(let [component (case view-id
|
||||||
:chat chat.views/chat-view
|
:chat chat.views/chat-view
|
||||||
:new-contact add-new.views/new-contact
|
:desktop/new-one-to-one add-new.views/new-one-to-one
|
||||||
|
:desktop/new-public-chat add-new.views/new-public-chat
|
||||||
|
:desktop/new-group-chat add-new.views/new-group-chat
|
||||||
:qr-code profile.views/qr-code
|
:qr-code profile.views/qr-code
|
||||||
:advanced-settings profile.views/advanced-settings
|
:advanced-settings profile.views/advanced-settings
|
||||||
:chat-profile chat.views/chat-profile
|
:chat-profile chat.views/chat-profile
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
(:require [status-im.ui.screens.desktop.main.views :as main.views]
|
(:require [status-im.ui.screens.desktop.main.views :as main.views]
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.ui.screens.intro.views :as intro.views]
|
[status-im.ui.screens.intro.views :as intro.views]
|
||||||
[status-im.ui.screens.group.add-contacts.views :refer [contact-toggle-list]]
|
[status-im.ui.screens.group.add-contacts.views :refer [contact-toggle-list
|
||||||
|
add-participants-toggle-list]]
|
||||||
[status-im.ui.screens.group.views :refer [new-group]]
|
[status-im.ui.screens.group.views :refer [new-group]]
|
||||||
[status-im.ui.screens.profile.group-chat.views :refer [group-chat-profile]]
|
[status-im.ui.screens.profile.group-chat.views :refer [group-chat-profile]]
|
||||||
[status-im.ui.screens.group.add-contacts.views :refer [add-participants-toggle-list]]
|
|
||||||
[status-im.ui.screens.accounts.create.views :as create.views]
|
[status-im.ui.screens.accounts.create.views :as create.views]
|
||||||
[status-im.ui.screens.accounts.login.views :as login.views]
|
[status-im.ui.screens.accounts.login.views :as login.views]
|
||||||
[status-im.ui.screens.accounts.recover.views :as recover.views]
|
[status-im.ui.screens.accounts.recover.views :as recover.views]
|
||||||
|
@ -26,7 +26,9 @@
|
||||||
:group-chat-profile group-chat-profile
|
:group-chat-profile group-chat-profile
|
||||||
:add-participants-toggle-list add-participants-toggle-list
|
:add-participants-toggle-list add-participants-toggle-list
|
||||||
|
|
||||||
(:new-contact
|
(:desktop/new-one-to-one
|
||||||
|
:desktop/new-group-chat
|
||||||
|
:desktop/new-public-chat
|
||||||
:advanced-settings
|
:advanced-settings
|
||||||
:chat
|
:chat
|
||||||
:home
|
:home
|
||||||
|
@ -36,4 +38,5 @@
|
||||||
:login login.views/login
|
:login login.views/login
|
||||||
react/view)]
|
react/view)]
|
||||||
[react/view {:style {:flex 1}}
|
[react/view {:style {:flex 1}}
|
||||||
[component]])))
|
[component]
|
||||||
|
[main.views/popup-view]])))
|
|
@ -92,6 +92,7 @@
|
||||||
"network-id": "Network ID",
|
"network-id": "Network ID",
|
||||||
"connection-problem": "Messages connection problem",
|
"connection-problem": "Messages connection problem",
|
||||||
"contact-code": "Contact code",
|
"contact-code": "Contact code",
|
||||||
|
"enter-ens-or-contact-code": "Enter ENS username or contact code",
|
||||||
"transactions-delete-content": "Transaction will be removed from 'Unsigned' list",
|
"transactions-delete-content": "Transaction will be removed from 'Unsigned' list",
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"transactions-unsigned-empty": "You don't have any unsigned transactions",
|
"transactions-unsigned-empty": "You don't have any unsigned transactions",
|
||||||
|
|
Loading…
Reference in New Issue