Add TODO comments

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

View File

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

View File

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

View File

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

View File

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

View File

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