Compare commits

...
5 changed files with 76 additions and 1 deletions
@@ -4,6 +4,7 @@
[react-native.core :as rn]
[react-native.gesture :as gesture]
[status-im2.common.password-authentication.view :as password-authentication]
[status-im2.common.resources :as resources]
[status-im2.contexts.communities.actions.accounts-selection.style :as style]
[status-im2.contexts.communities.actions.community-rules.view :as community-rules]
[utils.i18n :as i18n]
@@ -32,6 +33,11 @@
:community-name community-name
:container-style {:margin-top 8}}]])
(def accounts
[{:source (resources/get-mock-image :coinbase)}
{:source (resources/get-mock-image :decentraland)}
{:source (resources/get-mock-image :rarible)}])
(defn view
[]
(let [{id :community-id} (rf/sub [:get-screen-params])
@@ -47,6 +53,33 @@
:logo-uri (get-in images [:thumbnail :uri])}]
[gesture/scroll-view
[rn/view {:style style/content}
[quo/text
{:style {:padding-top 12
:padding-bottom 8}
: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 #(rf/dispatch [:open-modal :addresses-for-permissions
{:community-id id}])
: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)
:description :text
:action :arrow
:label :preview
:label-props {:type :accounts
:data (subvec accounts 0 1)}
:description-props {:text "Trip to Vegas"}}]}]
[quo/text
{:style {:margin-top 24}
:accessibility-label :community-rules-title
@@ -0,0 +1,9 @@
(ns status-im2.contexts.communities.actions.addresses-for-permissions.style)
(def screen-horizontal-padding 20)
(def container {:flex 1})
(def header
{;; :padding-bottom 12 :padding-horizontal screen-horizontal-padding
})
@@ -0,0 +1,23 @@
(ns status-im2.contexts.communities.actions.addresses-for-permissions.view
(:require [quo.core :as quo]
[react-native.core :as rn]
[status-im2.contexts.communities.actions.addresses-for-permissions.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn view
[]
(let [{id :community-id} (rf/sub [:get-screen-params])
{:keys [name color images]} (rf/sub [:communities/community id])]
[rn/view {:style style/container}
[quo/drawer-top
{:type :context-tag
:title (i18n/label :t/addresses-for-permissions)
:button-icon :i/info
:community-name name
:community-logo (get-in images [:thumbnail :uri])
:customization-color color
:on-button-press #(rf/dispatch [:navigate-to-within-stack [:community :community :id id]])
:on-button-long-press #(rf/dispatch [:navigate-to-within-stack
[:community :community :id id]])}]]))
+6 -1
View File
@@ -11,6 +11,8 @@
[status-im2.contexts.chat.new-chat.view :as new-chat]
[status-im2.contexts.chat.photo-selector.view :as photo-selector]
[status-im2.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection]
[status-im2.contexts.communities.actions.addresses-for-permissions.view :as
addresses-for-permissions]
[status-im2.contexts.communities.actions.request-to-join.view :as join-menu]
[status-im2.contexts.communities.discover.view :as communities.discover]
[status-im2.contexts.communities.overview.view :as communities.overview]
@@ -98,6 +100,10 @@
:options {:sheet? true}
:component communities.accounts-selection/view}
{:name :addresses-for-permissions
:options {:sheet? true}
:component addresses-for-permissions/view}
{:name :lightbox
:options options/lightbox
:component lightbox/lightbox}
@@ -352,4 +358,3 @@
(when config/quo-preview-enabled?
status-im-preview/main-screens)))
+5
View File
@@ -177,6 +177,11 @@
"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",
"addresses-for-permissions": "Addresses for permissions",
"members-label": "Members",
"open-membership": "Open membership",
"member-kick": "Kick member",