parent
386ba0051f
commit
d0f7dc8539
|
@ -125,7 +125,7 @@
|
||||||
:height 13}
|
:height 13}
|
||||||
:handler (fn [])}]
|
:handler (fn [])}]
|
||||||
[{:title "Profile"
|
[{:title "Profile"
|
||||||
:icon "icon_menu_group"
|
:icon :menu_group
|
||||||
:icon-style {:width 25
|
:icon-style {:width 25
|
||||||
:height 19}
|
:height 19}
|
||||||
:handler #(dispatch [:show-profile @chat-id])}])]
|
:handler #(dispatch [:show-profile @chat-id])}])]
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
[action-button-item {:title "New Group Chat"
|
[action-button-item {:title "New Group Chat"
|
||||||
:buttonColor "#1abc9c"
|
:buttonColor "#1abc9c"
|
||||||
:onPress (fn []
|
:onPress (fn []
|
||||||
(dispatch [:show-group-new navigator]))}
|
(dispatch [:show-group-new]))}
|
||||||
[icon {:name "person-stalker"
|
[icon {:name "person-stalker"
|
||||||
:style {:fontSize 20
|
:style {:fontSize 20
|
||||||
:height 22
|
:height 22
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
text
|
text
|
||||||
text-input
|
text-input
|
||||||
image
|
image
|
||||||
|
icon
|
||||||
scroll-view
|
scroll-view
|
||||||
navigator
|
|
||||||
touchable-highlight
|
touchable-highlight
|
||||||
touchable-opacity]]
|
touchable-opacity]]
|
||||||
[syng-im.resources :as res]
|
[syng-im.resources :as res]
|
||||||
[syng-im.components.profile-styles :as st]
|
[syng-im.components.profile-styles :as st]))
|
||||||
[syng-im.navigation :refer [nav-pop]]))
|
|
||||||
|
|
||||||
(defn user-photo [{:keys [photo-path]}]
|
(defn user-photo [{:keys [photo-path]}]
|
||||||
[image {:source (if (s/blank? photo-path)
|
[image {:source (if (s/blank? photo-path)
|
||||||
|
@ -34,21 +33,19 @@
|
||||||
[text {:style st/profile-property-view-value}
|
[text {:style st/profile-property-view-value}
|
||||||
value]]])
|
value]]])
|
||||||
|
|
||||||
(defn message-user [navigator identity]
|
(defn message-user [identity]
|
||||||
(when identity
|
(when identity
|
||||||
(dispatch [:show-chat identity navigator :push])))
|
(dispatch [:show-chat identity nil :push])))
|
||||||
|
|
||||||
(defn profile [{:keys [navigator]}]
|
(defn profile []
|
||||||
(let [contact (subscribe [:contact])]
|
(let [contact (subscribe [:contact])]
|
||||||
(fn [{:keys [navigator]}]
|
(fn []
|
||||||
[scroll-view {:style st/profile}
|
[scroll-view {:style st/profile}
|
||||||
[touchable-highlight {:style st/profile-back-button-touchable
|
[touchable-highlight {:style st/profile-back-button-touchable
|
||||||
:on-press (fn []
|
:on-press #(dispatch [:navigate-back])
|
||||||
(nav-pop navigator))
|
|
||||||
:underlay-color :transparent}
|
:underlay-color :transparent}
|
||||||
[view st/profile-back-button-container
|
[view st/profile-back-button-container
|
||||||
[image {:source {:uri "icon_back"}
|
[icon :back st/profile-back-button-icon]]]
|
||||||
:style st/profile-back-button-icon}]]]
|
|
||||||
[view st/status-block
|
[view st/status-block
|
||||||
[view st/user-photo-container
|
[view st/user-photo-container
|
||||||
[user-photo {}]
|
[user-photo {}]
|
||||||
|
@ -58,8 +55,7 @@
|
||||||
[text {:style st/status}
|
[text {:style st/status}
|
||||||
"!not implemented"]
|
"!not implemented"]
|
||||||
[view st/btns-container
|
[view st/btns-container
|
||||||
[touchable-highlight {:onPress #(message-user navigator
|
[touchable-highlight {:onPress #(message-user (:whisper-identity @contact))
|
||||||
(:whisper-identity @contact))
|
|
||||||
:underlay-color :transparent}
|
:underlay-color :transparent}
|
||||||
[view st/message-btn
|
[view st/message-btn
|
||||||
[text {:style st/message-btn-text}
|
[text {:style st/message-btn-text}
|
||||||
|
@ -69,8 +65,7 @@
|
||||||
)
|
)
|
||||||
:underlay-color :transparent}
|
:underlay-color :transparent}
|
||||||
[view st/more-btn
|
[view st/more-btn
|
||||||
[image {:source {:uri "icon_more_vertical_blue"}
|
[icon :more_vertical_blue st/more-btn-image]]]]]
|
||||||
:style st/more-btn-image}]]]]]
|
|
||||||
[view st/profile-properties-container
|
[view st/profile-properties-container
|
||||||
[profile-property-view {:name "Username"
|
[profile-property-view {:name "Username"
|
||||||
:value (:name @contact)}]
|
:value (:name @contact)}]
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
toolbar-background1]]
|
toolbar-background1]]
|
||||||
[syng-im.components.realm :refer [list-view]]
|
[syng-im.components.realm :refer [list-view]]
|
||||||
[syng-im.utils.listview :refer [to-realm-datasource]]
|
[syng-im.utils.listview :refer [to-realm-datasource]]
|
||||||
[reagent.core :as r]
|
[reagent.core :as r]))
|
||||||
[syng-im.navigation :refer [nav-pop]]))
|
|
||||||
|
|
||||||
(defn toolbar [{:keys [navigator title nav-action action background-color]}]
|
(defn toolbar [{:keys [navigator title nav-action action background-color]}]
|
||||||
[view {:style {:flexDirection "row"
|
[view {:style {:flexDirection "row"
|
||||||
|
@ -30,7 +29,7 @@
|
||||||
:alignItems "center"
|
:alignItems "center"
|
||||||
:justifyContent "center"}
|
:justifyContent "center"}
|
||||||
[image (:image nav-action)]]]
|
[image (:image nav-action)]]]
|
||||||
[touchable-highlight {:on-press #(nav-pop navigator)}
|
[touchable-highlight {:on-press #(dispatch [:navigate-back])}
|
||||||
[view {:width 56
|
[view {:width 56
|
||||||
:height 56}
|
:height 56}
|
||||||
[image {:source {:uri "icon_back"}
|
[image {:source {:uri "icon_back"}
|
||||||
|
|
|
@ -561,9 +561,9 @@
|
||||||
db)))
|
db)))
|
||||||
|
|
||||||
(register-handler :show-group-new
|
(register-handler :show-group-new
|
||||||
(fn [db [action navigator]]
|
(fn [db [action]]
|
||||||
(log/debug action)
|
(log/debug action)
|
||||||
(nav-push navigator {:view-id :new-group})
|
(dispatch [:navigate-to :new-group])
|
||||||
(clear-new-group db)))
|
(clear-new-group db)))
|
||||||
|
|
||||||
(register-handler :select-for-new-group
|
(register-handler :select-for-new-group
|
||||||
|
|
Loading…
Reference in New Issue