Merge pull request #137 from status-im/fix/single-drawer

Single drawer
This commit is contained in:
Roman Volosovskyi 2016-06-22 10:49:22 +03:00 committed by GitHub
commit 5271fa7101
4 changed files with 98 additions and 101 deletions

View File

@ -13,7 +13,7 @@
[status-im.chats-list.views.chat-list-item :refer [chat-list-item]]
[status-im.components.action-button :refer [action-button
action-button-item]]
[status-im.components.drawer.view :refer [drawer-view open-drawer]]
[status-im.components.drawer.view :refer [open-drawer]]
[status-im.components.styles :refer [color-blue
toolbar-background1
toolbar-background2]]
@ -46,7 +46,6 @@
content-height (r/atom 0)]
(dispatch [:set :chats-scrolled? false])
(fn []
[drawer-view
[view st/chats-container
[chats-list-toolbar]
[list-view {:dataSource (to-datasource @chats)
@ -83,4 +82,4 @@
:buttonColor :#1abc9c
:onPress #(dispatch [:show-group-new])}
[icon {:name :person-stalker
:style st/person-stalker-icon}]]]]]])))
:style st/person-stalker-icon}]]]]])))

View File

@ -10,6 +10,7 @@
image
touchable-highlight
get-dimensions]]
[status-im.components.drawer.view :refer [drawer-view]]
[status-im.components.animation :as anim]
[status-im.chats-list.screen :refer [chats-list]]
[status-im.discovery.screen :refer [discovery]]
@ -101,9 +102,10 @@
(defview main-tabs []
[view-id [:get :view-id]
tab-animation? [:get :prev-tab-view-id]]
[drawer-view
[view {:style common-st/flex}
[view {:style common-st/flex
:pointerEvents (if tab-animation? :none :auto)}
(doall (map #(tab-view %) tab-list))]
[tabs {:selected-view-id view-id
:tab-list tab-list}]])
:tab-list tab-list}]]])

View File

@ -13,7 +13,7 @@
action-button-item]]
[status-im.contacts.views.contact :refer [contact-extended-view]]
[status-im.components.toolbar :refer [toolbar]]
[status-im.components.drawer.view :refer [drawer-view open-drawer]]
[status-im.components.drawer.view :refer [open-drawer]]
[status-im.components.icons.ionicons :refer [icon]]
[status-im.components.styles :refer [color-blue
hamburger-icon
@ -63,7 +63,6 @@
contcats-count (subscribe [:contacts-count])
show-toolbar-shadow? (r/atom false)]
(fn []
[drawer-view
[view st/contacts-list-container
[contact-list-toolbar]
[view {:style st/toolbar-shadow}
@ -97,4 +96,4 @@
:buttonColor :#9b59b6
:onPress #(dispatch [:navigate-to :new-contact])}
[icon {:name :android-create
:style create-icon}]]]]])))
:style create-icon}]]]])))

View File

@ -9,7 +9,6 @@
touchable-highlight]]
[status-im.utils.identicon :refer [identicon]]
[status-im.components.toolbar :refer [toolbar]]
[status-im.components.drawer.view :refer [drawer-view open-drawer]]
[status-im.components.styles :refer [color-purple
color-white
icon-search
@ -57,7 +56,6 @@
(defview new-contact []
[{:keys [name whisper-identity phone-number] :as new-contact} [:get :new-contact]]
[drawer-view
[view st/contact-form-container
[linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"]
:start [0, 0]
@ -75,5 +73,4 @@
:handler #(dispatch [:add-new-contact (merge {:photo-path (identicon whisper-identity)} new-contact)])}}]
[view st/form-container
[contact-whisper-id-input whisper-identity]
[contact-name-input name]
]]])
[contact-name-input name]]])