Add system warnings, delivery notifications, general unread messages
badge
This commit is contained in:
parent
2d3952f252
commit
d0e5ecd48b
|
@ -3,6 +3,7 @@
|
||||||
(:require [re-frame.core :as re-frame]
|
(:require [re-frame.core :as re-frame]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
|
[taoensso.timbre :as log]
|
||||||
[status-im.ui.components.connectivity.styles :as styles]
|
[status-im.ui.components.connectivity.styles :as styles]
|
||||||
[status-im.i18n :as i18n]))
|
[status-im.i18n :as i18n]))
|
||||||
|
|
||||||
|
|
|
@ -1,58 +1,58 @@
|
||||||
(ns status-im.ui.screens.desktop.main.chat.views
|
(ns status-im.ui.screens.desktop.main.chat.views
|
||||||
(:require-macros [status-im.utils.views :as views])
|
(:require-macros [status-im.utils.views :as views])
|
||||||
(:require [re-frame.core :as re-frame]
|
(:require [re-frame.core :as re-frame]
|
||||||
[status-im.ui.components.icons.vector-icons :as icons]
|
[status-im.ui.components.icons.vector-icons :as icons]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[status-im.chat.styles.message.message :as message.style]
|
[status-im.chat.styles.message.message :as message.style]
|
||||||
[status-im.chat.views.message.message :as message]
|
[status-im.chat.views.message.message :as message]
|
||||||
[status-im.utils.gfycat.core :as gfycat.core]
|
[status-im.utils.gfycat.core :as gfycat.core]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[status-im.utils.gfycat.core :as gfycat]
|
[status-im.utils.gfycat.core :as gfycat]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[status-im.utils.identicon :as identicon]
|
[status-im.utils.identicon :as identicon]
|
||||||
[status-im.utils.datetime :as time]
|
[status-im.utils.datetime :as time]
|
||||||
[status-im.utils.utils :as utils]
|
[status-im.utils.utils :as utils]
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.ui.components.connectivity.view :as connectivity]
|
[status-im.ui.components.connectivity.view :as connectivity]
|
||||||
[status-im.ui.components.colors :as colors]
|
[status-im.ui.components.colors :as colors]
|
||||||
[status-im.chat.views.message.datemark :as message.datemark]
|
[status-im.chat.views.message.datemark :as message.datemark]
|
||||||
[status-im.ui.screens.desktop.main.tabs.profile.views :as profile.views]
|
[status-im.ui.screens.desktop.main.tabs.profile.views :as profile.views]
|
||||||
[status-im.ui.components.icons.vector-icons :as vector-icons]
|
[status-im.ui.components.icons.vector-icons :as vector-icons]
|
||||||
[status-im.ui.screens.desktop.main.chat.styles :as styles]
|
[status-im.ui.screens.desktop.main.chat.styles :as styles]
|
||||||
[status-im.utils.contacts :as utils.contacts]
|
[status-im.utils.contacts :as utils.contacts]
|
||||||
[status-im.i18n :as i18n]
|
[status-im.i18n :as i18n]
|
||||||
[status-im.ui.screens.desktop.main.chat.events :as chat.events]))
|
[status-im.ui.screens.desktop.main.chat.events :as chat.events]))
|
||||||
|
|
||||||
(views/defview toolbar-chat-view [{:keys [chat-id color public-key public? group-chat]
|
(views/defview toolbar-chat-view [{:keys [chat-id color public-key public? group-chat]
|
||||||
:as current-chat}]
|
:as current-chat}]
|
||||||
(views/letsubs [chat-name [:get-current-chat-name]
|
(views/letsubs [chat-name [:get-current-chat-name]
|
||||||
{:keys [pending? whisper-identity photo-path]} [:get-current-chat-contact]]
|
{:keys [pending? whisper-identity photo-path]} [:get-current-chat-contact]]
|
||||||
[react/view {:style styles/toolbar-chat-view}
|
[react/view {:style styles/toolbar-chat-view}
|
||||||
[react/view {:style {:flex-direction :row
|
[react/view {:style {:flex-direction :row
|
||||||
:flex 1}}
|
:flex 1}}
|
||||||
(if public?
|
(if public?
|
||||||
[react/view {:style (styles/topic-image color)}
|
[react/view {:style (styles/topic-image color)}
|
||||||
[react/text {:style styles/topic-text}
|
[react/text {:style styles/topic-text}
|
||||||
(string/capitalize (second chat-name))]]
|
(string/capitalize (second chat-name))]]
|
||||||
[react/image {:style styles/chat-icon
|
[react/image {:style styles/chat-icon
|
||||||
:source {:uri photo-path}}])
|
:source {:uri photo-path}}])
|
||||||
[react/view {:style (styles/chat-title-and-type pending?)}
|
[react/view {:style (styles/chat-title-and-type pending?)}
|
||||||
[react/text {:style styles/chat-title
|
[react/text {:style styles/chat-title
|
||||||
:font :medium}
|
:font :medium}
|
||||||
chat-name]
|
chat-name]
|
||||||
(cond pending?
|
(cond pending?
|
||||||
[react/text {:style styles/add-contact-text
|
[react/text {:style styles/add-contact-text
|
||||||
:on-press #(re-frame/dispatch [:add-contact whisper-identity])}
|
:on-press #(re-frame/dispatch [:add-contact whisper-identity])}
|
||||||
(i18n/label :t/add-to-contacts)]
|
(i18n/label :t/add-to-contacts)]
|
||||||
public?
|
public?
|
||||||
[react/text {:style styles/public-chat-text}
|
[react/text {:style styles/public-chat-text}
|
||||||
(i18n/label :t/public-chat)])]]
|
(i18n/label :t/public-chat)])]]
|
||||||
#_[react/view
|
#_[react/view
|
||||||
[react/popup-menu
|
[react/popup-menu
|
||||||
[react/popup-menu-trigger {:text "Popup test"}]
|
[react/popup-menu-trigger {:text "Popup test"}]
|
||||||
[react/popup-menu-options
|
[react/popup-menu-options
|
||||||
[react/popup-menu-option {:text "First"}]
|
[react/popup-menu-option {:text "First"}]
|
||||||
[react/popup-menu-option {:text "Second"}]]]]
|
[react/popup-menu-option {:text "Second"}]]]]
|
||||||
[react/view
|
[react/view
|
||||||
(when (and (not group-chat) (not public?))
|
(when (and (not group-chat) (not public?))
|
||||||
[react/text {:style (styles/profile-actions-text colors/black)
|
[react/text {:style (styles/profile-actions-text colors/black)
|
||||||
|
|
Loading…
Reference in New Issue