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 8, 2023
1 parent de4e233 commit f9d1f4f
Show file tree
Hide file tree
Showing 5 changed files with 49 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 @@ -35,7 +35,13 @@
(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])
{:keys [accounts]} (rf/sub [:wallet])
account-list (->> accounts
vals
(map #(assoc % :customization-color (:color %)))
vec)]
(tap> account-list)
[rn/view {:style style/container}
[quo/page-nav
{:text-align :left
Expand All @@ -46,9 +52,37 @@
{: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 #(print "Show All Addresses Sheet")
:description :text
:action :arrow
:label :preview
:label-props {:type
:accounts
:data account-list}
:description-props {:text (i18n/label :t/all-addresses)}}
{:title (i18n/label :t/for-airdrops)
:on-press #(print "Show AirDrop Address Sheet")
:description :text
:action :arrow
:label :preview
:label-props {:type
:accounts
:data (subvec account-list 0 1)}
:description-props {:text (:name (account-list 0))}}]}]

[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 f9d1f4f

Please sign in to comment.