fix(communities): token-gated community info text (#21338)
This commit is contained in:
parent
63d0aaca2a
commit
ca3720be0a
|
@ -119,38 +119,29 @@
|
|||
:icon-left :i/communities}
|
||||
(i18n/label :t/request-to-join)])
|
||||
|
||||
(defn- info-button-handler
|
||||
(defn token-gated-communities-info
|
||||
[]
|
||||
(rf/dispatch
|
||||
[:show-bottom-sheet
|
||||
{:content
|
||||
(fn []
|
||||
[quo/documentation-drawers
|
||||
{:title (i18n/label :t/token-gated-communities)
|
||||
:show-button? true
|
||||
:button-label (i18n/label :t/read-more)
|
||||
:button-icon :info}
|
||||
[quo/documentation-drawers {:title (i18n/label :t/token-gated-communities)}
|
||||
[quo/text {:size :paragraph-2}
|
||||
(i18n/label :t/token-gated-communities-info)]])}]))
|
||||
(i18n/label :t/token-gated-communities-info)]])
|
||||
|
||||
(defn- token-requirements
|
||||
[{:keys [id color role-permissions?]}]
|
||||
(let [{:keys [can-request-access?
|
||||
no-member-permission?
|
||||
tokens
|
||||
networks-not-supported?
|
||||
highest-permission-role]} (rf/sub [:community/token-gated-overview id])
|
||||
highest-role-text
|
||||
(i18n/label
|
||||
(let [{:keys [can-request-access? no-member-permission? networks-not-supported?
|
||||
highest-permission-role
|
||||
tokens]} (rf/sub [:community/token-gated-overview id])
|
||||
highest-role-text (i18n/label
|
||||
(communities.utils/role->translation-key highest-permission-role :t/member))
|
||||
on-press (rn/use-callback (fn []
|
||||
on-press (rn/use-callback
|
||||
(fn []
|
||||
(if config/community-accounts-selection-enabled?
|
||||
(rf/dispatch [:open-modal :community-account-selection-sheet
|
||||
{:community-id id}])
|
||||
(rf/dispatch [:open-modal :community-requests-to-join
|
||||
{:id
|
||||
id}])))
|
||||
[id])]
|
||||
{:id id}])))
|
||||
[id])
|
||||
on-press-info #(rf/dispatch
|
||||
[:show-bottom-sheet {:content token-gated-communities-info}])]
|
||||
(cond
|
||||
networks-not-supported?
|
||||
[network-not-supported]
|
||||
|
@ -165,8 +156,7 @@
|
|||
:community-color color
|
||||
:satisfied? can-request-access?
|
||||
:on-press on-press
|
||||
:on-press-info
|
||||
info-button-handler}])))
|
||||
:on-press-info on-press-info}])))
|
||||
|
||||
(defn- join-community
|
||||
[{:keys [id joined permissions] :as community}]
|
||||
|
|
|
@ -2486,8 +2486,8 @@
|
|||
"token-auto-validate-name-error": "Wrong name for token {{symbol}} at address {{address}} - set to {{expected}} but detected as {{actual}}",
|
||||
"token-auto-validate-symbol-error": "Wrong symbol for token {{symbol}} at address {{address}} - set to {{expected}} but detected as {{actual}}",
|
||||
"token-details": "Token details",
|
||||
"token-gated-communities": "Token gated communities",
|
||||
"token-gated-communities-info": "Here will be something relevant about this topic. This will help the user get more context and therefore have a better understanding of it.",
|
||||
"token-gated-communities": "Token-gated communities",
|
||||
"token-gated-communities-info": "If you want to join a token-gated community, you need to meet the token requirements set by the community Owner.\n\nThe Status app automatically checks if you meet the community requirements. If you meet the requirements, the option to join the community is available.",
|
||||
"token-master": "Token Master",
|
||||
"token-not-available-on-networks": "{{token-symbol}} is not available on {{networks}}.",
|
||||
"token-not-available-on-receiver-networks": "{{token-symbol}} is not available on the recipient’s desired networks. Proceed with caution.",
|
||||
|
|
Loading…
Reference in New Issue