Hide option to select community type
Fixes: #12147 Hide option to select community type
This commit is contained in:
parent
213c288cc1
commit
58d994706f
|
@ -199,21 +199,18 @@
|
|||
(fx/defn create
|
||||
{:events [::create-confirmation-pressed]}
|
||||
[{:keys [db]}]
|
||||
(let [{:keys [name description membership image]} (get db :communities/create)]
|
||||
(let [{:keys [name description image]} (get db :communities/create)]
|
||||
;; If access is ENS only, we set the access to require approval and set the rule
|
||||
;; of ens only
|
||||
(let [params (cond-> {:name name
|
||||
:description description
|
||||
:membership (or membership constants/community-no-membership-access)
|
||||
:color (rand-nth colors/chat-colors)
|
||||
:image (string/replace-first (str image) #"file://" "")
|
||||
:imageAx 0
|
||||
:imageAy 0
|
||||
:imageBx crop-size
|
||||
:imageBy crop-size}
|
||||
(= membership constants/community-rule-ens-only)
|
||||
(assoc :membership constants/community-on-request-access
|
||||
:ens-only true))]
|
||||
(let [params {:name name
|
||||
:description description
|
||||
:membership constants/community-on-request-access
|
||||
:color (rand-nth colors/chat-colors)
|
||||
:image (string/replace-first (str image) #"file://" "")
|
||||
:imageAx 0
|
||||
:imageAy 0
|
||||
:imageBx crop-size
|
||||
:imageBy crop-size}]
|
||||
|
||||
{::json-rpc/call [{:method "wakuext_createCommunity"
|
||||
:params [params]
|
||||
|
|
|
@ -158,17 +158,7 @@
|
|||
:on-change-text #(>evt [::communities/create-field :description %])}]]
|
||||
[quo/list-header {:color :main}
|
||||
(i18n/label :t/community-thumbnail-image)]
|
||||
[photo-picker]
|
||||
(when-not editing? [:<>
|
||||
[quo/separator {:style {:margin-vertical 10}}]
|
||||
[quo/list-item {:title (i18n/label :t/membership-button)
|
||||
:accessory-text (i18n/label (get-in memberships/options [membership :title] :t/membership-none))
|
||||
:accessory :text
|
||||
:on-press #(>evt [:navigate-to :community-membership])
|
||||
:chevron true
|
||||
:size :small}]
|
||||
[quo/list-footer
|
||||
(i18n/label (get-in memberships/options [membership :description] :t/membership-none-placeholder))]])]))
|
||||
[photo-picker]]))
|
||||
|
||||
(defn view []
|
||||
(let [{:keys [name description]} (<sub [:communities/create])]
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
"give-a-short-description": "Give a short description",
|
||||
"communities-alpha": "Communities (alpha)",
|
||||
"communities-verified": "✓ Verified Status Community",
|
||||
"communities-enabled": "Communities enabled",
|
||||
"request-access": "Request access",
|
||||
"membership-request-pending": "Membership request pending",
|
||||
"create-community": "Create a community",
|
||||
|
|
Loading…
Reference in New Issue