Skip to content

Commit 954b1d6

Browse files
committed
feature: integrate status-tag for pending contact-request
1 parent 2ff9fbc commit 954b1d6

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

src/status_im/contexts/profile/contact/header/style.cljs

+9
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@
1515
{:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
1616
:padding-horizontal 20
1717
:margin-top margin-top}))
18+
19+
(def status-tag-wrapper
20+
{:flex-direction :row
21+
:padding-top 12
22+
:padding-right 12})
23+
24+
(def header-top-wrapper
25+
{:flex-direction :row
26+
:justify-content :space-between})

src/status_im/contexts/profile/contact/header/view.cljs

+18-9
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,38 @@
44
[quo.theme]
55
[react-native.core :as rn]
66
[status-im.common.scalable-avatar.view :as avatar]
7+
[status-im.constants :as constants]
78
[status-im.contexts.profile.contact.header.style :as style]
89
[status-im.contexts.profile.utils :as profile.utils]
10+
[utils.i18n :as i18n]
911
[utils.re-frame :as rf]))
1012

1113
(defn view
1214
[{:keys [scroll-y]}]
1315
(let [{:keys [public-key customization-color
14-
emoji-hash bio]
16+
emoji-hash bio contact-request-state]
1517
:as profile} (rf/sub [:contacts/current-contact])
1618
customization-color (or customization-color :blue)
1719
full-name (profile.utils/displayed-name profile)
1820
profile-picture (profile.utils/photo profile)
1921
online? (rf/sub [:visibility-status-updates/online? public-key])
2022
theme (quo.theme/use-theme-value)]
2123
[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}]])]
3039
[quo/page-top
3140
{:title full-name
3241
:description :text

0 commit comments

Comments
 (0)