Add community link in description
Fixes: #12179 Fixes: #12133 Fixes: #12131 This commit adds a community link in the description that can be copied and shared by the user. Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
f26c3090c6
commit
f0d739291e
|
@ -9,12 +9,18 @@
|
|||
[status-im.utils.fx :as fx]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.bottom-sheet.core :as bottom-sheet]
|
||||
[status-im.utils.universal-links.core :as universal-links]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.navigation :as navigation]))
|
||||
|
||||
(def crop-size 1000)
|
||||
|
||||
(defn universal-link [community-id]
|
||||
(str (:external universal-links/domains)
|
||||
"/c/"
|
||||
community-id))
|
||||
|
||||
(def featured
|
||||
[{:name "Status"
|
||||
:id constants/status-community-id}])
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
[:<>
|
||||
[quo/list-item
|
||||
{:title name
|
||||
:subtitle (i18n/label :t/view-profile)
|
||||
:subtitle (i18n/label :t/community-info)
|
||||
:on-press #(hide-sheet-and-dispatch [:navigate-to :community-management {:community-id id}])
|
||||
:chevron true
|
||||
:icon (cond
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
[status-im.ui.components.profile-header.view :as profile-header]
|
||||
[status-im.i18n.i18n :as i18n]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.ui.components.copyable-text :as copyable-text]
|
||||
[status-im.communities.core :as communities]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.components.react :as react]
|
||||
|
@ -47,6 +48,20 @@
|
|||
[quo/list-footer {:color :main}
|
||||
description]
|
||||
[quo/separator {:style {:margin-vertical 8}}]])
|
||||
[:<>
|
||||
(let [link (communities/universal-link community-id)]
|
||||
[react/view {:padding-vertical 10
|
||||
:padding-horizontal 16}
|
||||
[react/view {:margin-bottom 20}
|
||||
[quo/text {:color :secondary} (i18n/label :t/community-link)]]
|
||||
[copyable-text/copyable-text-view
|
||||
{:copied-text link}
|
||||
[react/view {:border-radius 16
|
||||
:padding-horizontal 16
|
||||
:padding-vertical 11
|
||||
:background-color colors/blue-light}
|
||||
[quo/text {:color :link} (subs link 8)]]]])
|
||||
[quo/separator {:style {:margin-vertical 8}}]]
|
||||
(when show-members-count?
|
||||
[quo/list-item {:chevron true
|
||||
:accessory
|
||||
|
@ -89,6 +104,3 @@
|
|||
:component-did-mount (fn []
|
||||
(communities/fetch-requests-to-join! (get-in route [:route :params :community-id])))
|
||||
:reagent-render management}))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -194,6 +194,7 @@
|
|||
"community-image-delete": "",
|
||||
"community-image-remove": "Remove",
|
||||
"community-color": "Community colour",
|
||||
"community-link": "Community link",
|
||||
"community-color-placeholder": "Pick a colour",
|
||||
"membership-button": "Membership requirement",
|
||||
"membership-none": "None",
|
||||
|
@ -1523,6 +1524,7 @@
|
|||
"community": "Community",
|
||||
"verified-community": "✓ Verified community",
|
||||
"community-info-not-found": "Community information not found",
|
||||
"community-info": "Community info",
|
||||
"not-found": "Not found",
|
||||
"activity": "Activity",
|
||||
"reject-and-delete": "Reject and delete",
|
||||
|
|
Loading…
Reference in New Issue