Skip to content

Commit

Permalink
Addresses to share cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayesivan committed Dec 11, 2023
1 parent 1eb7504 commit 4d2bb37
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
{:padding-vertical 12
:padding-horizontal screen-horizontal-padding})

(def content
{:margin-bottom 20
(def section-title
{:padding-top 12
:padding-bottom 4
:padding-horizontal screen-horizontal-padding})

(defn bottom-actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[quo.core :as quo]
[react-native.core :as rn]
[react-native.gesture :as gesture]
[status-im2.common.not-implemented :as not-implemented]
[status-im2.common.password-authentication.view :as password-authentication]
[status-im2.contexts.communities.actions.accounts-selection.style :as style]
[status-im2.contexts.communities.actions.community-rules.view :as community-rules]
Expand Down Expand Up @@ -35,7 +36,11 @@
(defn view
[]
(let [{id :community-id} (rf/sub [:get-screen-params])
{:keys [name color images]} (rf/sub [:communities/community id])]
{:keys [name color images]} (rf/sub [:communities/community id])
accounts (->> (rf/sub [:wallet])
:accounts
vals
(map #(assoc % :customization-color (:color %))))]
[rn/view {:style style/container}
[quo/page-nav
{:text-align :left
Expand All @@ -46,9 +51,35 @@
{:community-name name
:logo-uri (get-in images [:thumbnail :uri])}]
[gesture/scroll-view
[rn/view {:style style/content}
[:<>
[quo/text
{:style {:margin-top 24}
{:style style/section-title
:accessibility-label :community-rules-title
:weight :semi-bold
:size :paragraph-1}
(i18n/label :t/address-to-share)]

[quo/category
{:list-type :settings
:data [{:title (i18n/label :t/join-as-a-member)
:on-press not-implemented/alert
:description :text
:action :arrow
:label :preview
:label-props {:type :accounts
:data accounts}
:description-props {:text (i18n/label :t/all-addresses)}}
{:title (i18n/label :t/for-airdrops)
:on-press not-implemented/alert
:description :text
:action :arrow
:label :preview
:label-props {:type :accounts
:data (take 1 accounts)}
:description-props {:text (-> accounts first :name)}}]}]

[quo/text
{:style style/section-title
:accessibility-label :community-rules-title
:weight :semi-bold
:size :paragraph-1}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
(ns status-im2.contexts.communities.actions.community-rules.style)

(def community-rule
{:flex 1
:align-items :flex-start
:margin-top 16})

(def community-rule-text
{:margin-left 6
:flex 1})
{:flex 1
:align-items :flex-start
:padding-vertical 8
:padding-horizontal 20})
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
(let [rules (rf/sub [:communities/rules id])]
[rn/view {:style style/community-rule}
[quo/text
{:style style/community-rule-text
:weight :regular
{:weight :regular
:size :paragraph-2}
rules]]))
4 changes: 4 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@
"other": "{{count}} members"
},
"community-rules": "Community rules",
"address-to-share": "Addresses to share",
"join-as-a-member": "Join as a Member",
"all-addresses": "All addresses",
"for-airdrops": "For airdrops",
"members-label": "Members",
"open-membership": "Open membership",
"member-kick": "Kick member",
Expand Down

0 comments on commit 4d2bb37

Please sign in to comment.