|
4 | 4 | [quo.theme]
|
5 | 5 | [react-native.core :as rn]
|
6 | 6 | [status-im.common.scalable-avatar.view :as avatar]
|
| 7 | + [status-im.constants :as constants] |
7 | 8 | [status-im.contexts.profile.contact.header.style :as style]
|
8 | 9 | [status-im.contexts.profile.utils :as profile.utils]
|
| 10 | + [utils.i18n :as i18n] |
9 | 11 | [utils.re-frame :as rf]))
|
10 | 12 |
|
11 | 13 | (defn view
|
12 | 14 | [{:keys [scroll-y]}]
|
13 | 15 | (let [{:keys [public-key customization-color
|
14 |
| - emoji-hash bio] |
| 16 | + emoji-hash bio contact-request-state] |
15 | 17 | :as profile} (rf/sub [:contacts/current-contact])
|
16 | 18 | customization-color (or customization-color :blue)
|
17 | 19 | full-name (profile.utils/displayed-name profile)
|
18 | 20 | profile-picture (profile.utils/photo profile)
|
19 | 21 | online? (rf/sub [:visibility-status-updates/online? public-key])
|
20 | 22 | theme (quo.theme/use-theme-value)]
|
21 | 23 | [rn/view {:style style/header-container}
|
22 |
| - [rn/view {:style style/avatar-wrapper} |
23 |
| - [avatar/view |
24 |
| - {:scroll-y scroll-y |
25 |
| - :full-name full-name |
26 |
| - :online? online? |
27 |
| - :profile-picture profile-picture |
28 |
| - :border-color (colors/theme-colors colors/white colors/neutral-95 theme) |
29 |
| - :customization-color customization-color}]] |
| 24 | + [rn/view {:style style/header-top-wrapper} |
| 25 | + [rn/view {:style style/avatar-wrapper} |
| 26 | + [avatar/view |
| 27 | + {:scroll-y scroll-y |
| 28 | + :full-name full-name |
| 29 | + :online? online? |
| 30 | + :profile-picture profile-picture |
| 31 | + :border-color (colors/theme-colors colors/white colors/neutral-95 theme) |
| 32 | + :customization-color customization-color}]] |
| 33 | + (when (= contact-request-state constants/contact-request-state-sent) |
| 34 | + [rn/view {:style style/status-tag-wrapper} |
| 35 | + [quo/status-tag |
| 36 | + {:label (i18n/label :t/contact-profile-request-pending) |
| 37 | + :status {:type :pending} |
| 38 | + :size :large}]])] |
30 | 39 | [quo/page-top
|
31 | 40 | {:title full-name
|
32 | 41 | :description :text
|
|
0 commit comments