Skip to content

Commit 0e9847f

Browse files
[#18963] feat: actions UI for stranger contact profile (#19028)
1 parent 1aef310 commit 0e9847f

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
(ns status-im.contexts.profile.contact.actions.view
2+
(:require [quo.core :as quo]
3+
[status-im.common.not-implemented :as not-implemented]
4+
[utils.i18n :as i18n]))
5+
6+
(defn view
7+
[]
8+
[quo/action-drawer
9+
[[{:icon :i/edit
10+
:label (i18n/label :t/add-nickname-title)
11+
:on-press not-implemented/alert
12+
:accessibility-label :add-nickname}
13+
{:icon :i/qr-code
14+
:label (i18n/label :t/show-qr)
15+
:on-press not-implemented/alert
16+
:accessibility-label :show-qr-code}
17+
{:icon :i/share
18+
:label (i18n/label :t/share-profile)
19+
:on-press not-implemented/alert
20+
:accessibility-label :share-profile}
21+
{:icon :i/untrustworthy
22+
:label (i18n/label :t/mark-untrustworthy)
23+
:on-press not-implemented/alert
24+
:accessibility-label :mark-untrustworthy
25+
:add-divider? true
26+
:danger? true}
27+
{:icon :i/block
28+
:label (i18n/label :t/block-user)
29+
:on-press not-implemented/alert
30+
:accessibility-label :block-user
31+
:danger? true}]]])
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
(ns status-im.contexts.profile.contact.view
22
(:require [quo.foundations.colors :as colors]
33
[quo.theme]
4+
[react-native.core :as rn]
45
[react-native.reanimated :as reanimated]
5-
[status-im.common.not-implemented :as not-implemented]
66
[status-im.common.scroll-page.view :as scroll-page]
7+
[status-im.contexts.profile.contact.actions.view :as actions]
78
[status-im.contexts.profile.contact.header.view :as contact-header]
89
[utils.re-frame :as rf]))
910

1011
(defn view
1112
[]
1213
(let [{:keys [customization-color]} (rf/sub [:contacts/current-contact])
1314
scroll-y (reanimated/use-shared-value 0)
14-
theme (quo.theme/use-theme-value)]
15+
theme (quo.theme/use-theme-value)
16+
on-action-press (rn/use-callback (fn []
17+
(rf/dispatch [:show-bottom-sheet
18+
{:content (fn []
19+
[actions/view])}])))]
1520
[scroll-page/scroll-page
1621
{:navigate-back? true
1722
:height 148
@@ -20,5 +25,5 @@
2025
:cover-color (or customization-color colors/primary-50)
2126
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
2227
:page-nav-props {:right-side [{:icon-name :i/options
23-
:on-press not-implemented/alert}]}}
28+
:on-press on-action-press}]}}
2429
[contact-header/view {:scroll-y scroll-y}]]))

translations/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@
20632063
"and": "and",
20642064
"rename": "Rename",
20652065
"mark-untrustworthy": "Mark as Untrustworthy",
2066-
"block-user": "Block User",
2066+
"block-user": "Block user",
20672067
"group-details": "Group details",
20682068
"edit-name-and-image": "Edit name and image",
20692069
"change-group-privacy": "Change group privacy",

0 commit comments

Comments
 (0)