Add TODO comments

This commit is contained in:
virvar 2016-05-20 15:37:24 +03:00
parent df2d2b02ca
commit 3af6d2f369
5 changed files with 34 additions and 10 deletions

View File

@ -101,22 +101,29 @@
(let [{:keys [group-chat chat-id]}
(subscribe [:chat-properties [:group-chat :chat-id]])]
(when-let [actions (if @group-chat
[{:title "Add Contact to chat"
[{:title "Members"
;; TODO stub data: members
:subtitle "Justas, Geoff, Alex and you"
:icon :menu_group
:icon-style {:width 25
:height 19}
:handler #(dispatch [:show-add-participants])}
{:title "Remove Contact from chat"
:subtitle "Alex, John"
;; TODO not implemented: action Members
:handler nil}
{:title "Search chat"
:subtitle "!not implemented"
:icon :search_gray_copy
:icon-style {:width 17
:height 17}
:handler #(dispatch [:show-remove-participants])}
{:title "Leave Chat"
;; TODO not implemented: action Search chat
:handler nil}
{:title "Notifications and sounds"
:subtitle "!not implemented"
;;:subtitle "Chat muted"
:icon :muted
:icon-style {:width 18
:height 21}
:handler #(dispatch [:leave-group-chat])}
;; TODO not implemented: action Notifications
:handler nil}
{:title "Settings"
:icon :settings
:icon-style {:width 20
@ -133,19 +140,23 @@
:icon :search_gray_copy
:icon-style {:width 17
:height 17}
;; TODO not implemented: action Search chat
:handler nil}
{:title "Notifications and sounds"
:subtitle "!not implemented"
;;:subtitle "Notifications on"
:icon :muted
:icon-style {:width 18
:height 21}
;; TODO not implemented: action Notifications
:handler nil}
{:title "Settings"
:subtitle "!not implemented"
:icon :settings
:icon-style {:width 20
:height 13}
:handler (fn [])}])]
;; TODO not implemented: action Settings
:handler nil}])]
[view st/actions-wrapper
[view st/actions-separator]
[view st/actions-view
@ -173,7 +184,9 @@
(if (< 1 cnt)
" members"
" member")
;; TODO stub data: active members
", " cnt " active"))]]
;; TODO stub data: last activity
[text {:style st/last-activity} "Active a minute ago"])])))
(defn toolbar-action []

View File

@ -45,6 +45,7 @@
:onSubmitEditing #(try-send @chat @staged-commands-atom
input-message)}
input-message]
;; TODO emoticons: not implemented
[icon :smile st/smile-icon]
(when (message-valid? @staged-commands-atom input-message)
[touchable-highlight {:on-press #(send @chat input-message)}

View File

@ -23,6 +23,7 @@
:style st/hamburger-icon}
:handler open-drawer}
:title "Chats"
;; TODO implement search
:action {:image {:source {:uri :icon_search}
:style st/search-icon}
:handler (fn [])}}])

View File

@ -22,6 +22,7 @@
(defn close-member-menu []
(dispatch [:select-group-chat-member nil]))
;; TODO not in design
(defview member-menu []
[member [:group-settings-selected-member]]
[modal {:animated false
@ -65,6 +66,7 @@
(close-chat-color-picker)
(dispatch [:set-chat-color]))
;; TODO not in design
(defview chat-color-picker []
[show-color-picker [:get :group-settings-show-color-picker]
new-color [:get :new-chat-color]]
@ -92,10 +94,10 @@
(dispatch [:set-group-settings-show-color-picker true]))
(defn settings-view []
;; TODO implement settings handlers
(let [settings [{:custom-icon [chat-color-icon]
:title "Change color"
:handler show-chat-color-picker}
;; TODO not implemented: Notifications
(merge {:title "Notifications and sounds"
:subtitle "!not implemented"
:handler nil}
@ -110,11 +112,13 @@
:icon-style {:width 12
:height 12}
:title "Clear history"
;; TODO show confirmation dialog?
:handler #(dispatch [:clear-history])}
{:icon :bin
:icon-style {:width 12
:height 18}
:title "Delete and leave"
;; TODO show confirmation dialog?
:handler #(dispatch [:leave-group-chat])}]]
[view st/settings-container
(for [setting settings]
@ -150,6 +154,7 @@
"Edit"]]]
[text {:style st/members-text}
"Members"]
;; TODO add participants view is not in design
[touchable-highlight {:on-press #(dispatch [:show-add-participants])}
[view st/add-members-container
[icon :add-gray st/add-members-icon]

View File

@ -33,6 +33,7 @@
[view st/user-photo-container
[profile-icon]]
[text {:style st/user-name} name]
;; TODO stub data
[text {:style st/status} "!not implemented"]
[view st/btns-container
[touchable-highlight {:onPress #(message-user whisper-identity)}
@ -48,10 +49,13 @@
:value name}]
[profile-property-view {:name "Phone number"
:value phone-number}]
;; TODO stub data
[profile-property-view {:name "Email"
:value "!not implemented"}]
[view st/report-user-container
[touchable-opacity {}
[touchable-highlight {:on-press (fn []
;; TODO not implemented
)}
[text {:style st/report-user-text} "REPORT USER"]]]]])
(defview my-profile []