chats-list screen styles
This commit is contained in:
parent
0b3469cd64
commit
bb0a6c848f
|
@ -22,17 +22,17 @@
|
||||||
text1-color
|
text1-color
|
||||||
text2-color]]
|
text2-color]]
|
||||||
[syng-im.components.toolbar :refer [toolbar]]
|
[syng-im.components.toolbar :refer [toolbar]]
|
||||||
[syng-im.components.icons.ionicons :refer [icon]]))
|
[syng-im.components.icons.ionicons :refer [icon]]
|
||||||
|
[syng-im.chats-list.styles :as st]))
|
||||||
|
|
||||||
|
|
||||||
(defn chats-list-toolbar []
|
(defn chats-list-toolbar []
|
||||||
[toolbar {:nav-action {:image {:source {:uri "icon_hamburger"}
|
[toolbar {:nav-action {:image {:source {:uri :icon_hamburger}
|
||||||
:style {:width 16
|
:style st/hamburger-icon }
|
||||||
:height 12}}
|
|
||||||
:handler (fn [])}
|
:handler (fn [])}
|
||||||
:title "Chats"
|
:title "Chats"
|
||||||
:action {:image {:source {:uri "icon_search"}
|
:action {:image {:source {:uri :icon_search}
|
||||||
:style {:width 17
|
:style st/search-icon}
|
||||||
:height 17}}
|
|
||||||
:handler (fn [])}}])
|
:handler (fn [])}}])
|
||||||
|
|
||||||
(defn chats-list []
|
(defn chats-list []
|
||||||
|
@ -40,27 +40,22 @@
|
||||||
(fn []
|
(fn []
|
||||||
(let [chats @chats
|
(let [chats @chats
|
||||||
datasource (to-realm-datasource chats)]
|
datasource (to-realm-datasource chats)]
|
||||||
[view {:flex 1
|
[view st/chats-container
|
||||||
:backgroundColor :white}
|
|
||||||
[chats-list-toolbar]
|
[chats-list-toolbar]
|
||||||
[list-view {:dataSource datasource
|
[list-view {:dataSource datasource
|
||||||
:renderRow (fn [row _ _]
|
:renderRow (fn [row _ _]
|
||||||
(r/as-element [chat-list-item row]))
|
(r/as-element [chat-list-item row]))
|
||||||
:style {:backgroundColor :white}}]
|
:style st/list-container}]
|
||||||
[action-button {:buttonColor color-blue}
|
[action-button {:buttonColor color-blue}
|
||||||
[action-button-item
|
[action-button-item
|
||||||
{:title "New Chat"
|
{:title "New Chat"
|
||||||
:buttonColor :#9b59b6
|
:buttonColor :#9b59b6
|
||||||
:onPress #(dispatch [:navigate-to :contact-list])}
|
:onPress #(dispatch [:navigate-to :contact-list])}
|
||||||
[icon {:name :android-create
|
[icon {:name :android-create
|
||||||
:style {:fontSize 20
|
:style st/create-icon}]]
|
||||||
:height 22
|
|
||||||
:color :white}}]]
|
|
||||||
[action-button-item
|
[action-button-item
|
||||||
{:title "New Group Chat"
|
{:title "New Group Chat"
|
||||||
:buttonColor :#1abc9c
|
:buttonColor :#1abc9c
|
||||||
:onPress #(dispatch [:show-group-new])}
|
:onPress #(dispatch [:show-group-new])}
|
||||||
[icon {:name :person-stalker
|
[icon {:name :person-stalker
|
||||||
:style {:fontSize 20
|
:style st/person-stalker-icon}]]]]))))
|
||||||
:height 22
|
|
||||||
:color :white}}]]]]))))
|
|
||||||
|
|
|
@ -120,3 +120,28 @@
|
||||||
:fontSize 10
|
:fontSize 10
|
||||||
:color color-blue
|
:color color-blue
|
||||||
:textAlign :center})
|
:textAlign :center})
|
||||||
|
|
||||||
|
(def hamburger-icon
|
||||||
|
{:width 16
|
||||||
|
:height 12})
|
||||||
|
|
||||||
|
(def search-icon
|
||||||
|
{:width 17
|
||||||
|
:height 17})
|
||||||
|
|
||||||
|
(def chats-container
|
||||||
|
{:flex 1
|
||||||
|
:backgroundColor :white})
|
||||||
|
|
||||||
|
(def list-container
|
||||||
|
{:backgroundColor :white})
|
||||||
|
|
||||||
|
(def create-icon
|
||||||
|
{:fontSize 20
|
||||||
|
:height 22
|
||||||
|
:color :white})
|
||||||
|
|
||||||
|
(def person-stalker-icon
|
||||||
|
{:fontSize 20
|
||||||
|
:height 22
|
||||||
|
:color :white})
|
||||||
|
|
Loading…
Reference in New Issue