mirror of
https://github.com/status-im/status-react.git
synced 2025-01-27 03:06:39 +00:00
chore: get community img from real data (#14765)
This commit is contained in:
parent
92a180c477
commit
098821d20b
@ -1,8 +1,7 @@
|
|||||||
(ns status-im2.contexts.communities.menus.leave.style)
|
(ns status-im2.contexts.communities.menus.leave.style)
|
||||||
|
|
||||||
(def button-container
|
(def button-container
|
||||||
{:margin-top 16
|
{:margin-top 20
|
||||||
:margin-bottom 16
|
|
||||||
:flex 1
|
:flex 1
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:align-items :center
|
:align-items :center
|
||||||
@ -17,13 +16,13 @@
|
|||||||
(def text {:margin-top 16})
|
(def text {:margin-top 16})
|
||||||
|
|
||||||
(def container
|
(def container
|
||||||
{:height 160
|
{:height 180
|
||||||
:margin-left 20
|
:margin-left 20
|
||||||
:margin-right 20
|
:margin-right 20
|
||||||
:margin-bottom 20})
|
:margin-bottom 20})
|
||||||
|
|
||||||
(def inner-container
|
(def inner-container
|
||||||
{:flex 1
|
{:display :flex
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:align-items :center
|
:align-items :center
|
||||||
:justify-content :space-between})
|
:justify-content :space-between})
|
||||||
|
@ -12,32 +12,32 @@
|
|||||||
|
|
||||||
(defn leave-sheet
|
(defn leave-sheet
|
||||||
[id]
|
[id]
|
||||||
[rn/view {:style style/container}
|
(let [{:keys [name images]} (rf/sub [:communities/community id])]
|
||||||
[rn/view {:style style/inner-container}
|
[rn/view {:style style/container}
|
||||||
[quo/text
|
[rn/view {:style style/inner-container}
|
||||||
{:accessibility-label :communities-join-community
|
[quo/text
|
||||||
:weight :semi-bold
|
{:accessibility-label :communities-join-community
|
||||||
:size :heading-1}
|
:weight :semi-bold
|
||||||
(i18n/label :t/leave-community?)]]
|
:size :heading-1}
|
||||||
;; TODO get tag image from community data - https://github.com/status-im/status-mobile/issues/14740
|
(i18n/label :t/leave-community?)]]
|
||||||
#_[quo/context-tag
|
[quo/context-tag
|
||||||
{:style
|
{:style
|
||||||
{:margin-right :auto
|
{:margin-right :auto
|
||||||
:margin-top 8}}
|
:margin-top 8}}
|
||||||
(resources/get-image :status-logo) (:name community)]
|
(:thumbnail images) name]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:accessibility-label :communities-join-community
|
{:accessibility-label :communities-join-community
|
||||||
:size :paragraph-1
|
:size :paragraph-1
|
||||||
:style style/text}
|
:style style/text}
|
||||||
(i18n/label :t/leave-community-message)]
|
(i18n/label :t/leave-community-message)]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style style/button-container}
|
{:style style/button-container}
|
||||||
[quo/button
|
[quo/button
|
||||||
{:on-press #(rf/dispatch [:bottom-sheet/hide])
|
{:on-press #(rf/dispatch [:bottom-sheet/hide])
|
||||||
:type :grey
|
:type :grey
|
||||||
:style style/cancel-button}
|
:style style/cancel-button}
|
||||||
(i18n/label :t/cancel)]
|
(i18n/label :t/cancel)]
|
||||||
[quo/button
|
[quo/button
|
||||||
{:on-press #(hide-sheet-and-dispatch [:communities/leave id])
|
{:on-press #(hide-sheet-and-dispatch [:communities/leave id])
|
||||||
:style style/action-button}
|
:style style/action-button}
|
||||||
(i18n/label :t/leave-community)]]])
|
(i18n/label :t/leave-community)]]]))
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[status-im.communities.core :as communities]
|
[status-im.communities.core :as communities]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[status-im.react-native.resources :as resources]
|
|
||||||
[status-im2.contexts.communities.menus.request-to-join.style :as style]
|
[status-im2.contexts.communities.menus.request-to-join.style :as style]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[utils.requests :as requests]))
|
[utils.requests :as requests]))
|
||||||
@ -75,7 +74,7 @@
|
|||||||
:render-fn community-rule-item}])
|
:render-fn community-rule-item}])
|
||||||
|
|
||||||
(defn request-to-join
|
(defn request-to-join
|
||||||
[{:keys [permissions name id
|
[{:keys [permissions name id images
|
||||||
can-join? can-request-access?
|
can-join? can-request-access?
|
||||||
requested-to-join-at]}]
|
requested-to-join-at]}]
|
||||||
(let [agreed-to-rules? (reagent/atom false)
|
(let [agreed-to-rules? (reagent/atom false)
|
||||||
@ -93,12 +92,11 @@
|
|||||||
[rn/view
|
[rn/view
|
||||||
{:style style/request-icon}
|
{:style style/request-icon}
|
||||||
[quo/icon :i/info]]]
|
[quo/icon :i/info]]]
|
||||||
;; TODO get tag image from community data
|
|
||||||
[quo/context-tag
|
[quo/context-tag
|
||||||
{:style
|
{:style
|
||||||
{:margin-right :auto
|
{:margin-right :auto
|
||||||
:margin-top 8}}
|
:margin-top 8}}
|
||||||
(resources/get-image :status-logo) name]
|
(:thumbnail images) name]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:style {:margin-top 24}
|
{:style {:margin-top 24}
|
||||||
:accessibility-label :communities-rules-title
|
:accessibility-label :communities-rules-title
|
||||||
|
@ -312,9 +312,7 @@
|
|||||||
first-channel-height (reagent/atom 0)
|
first-channel-height (reagent/atom 0)
|
||||||
scroll-component (scroll-page/scroll-page
|
scroll-component (scroll-page/scroll-page
|
||||||
{:uri (get-in images [:large :uri])}
|
{:uri (get-in images [:large :uri])}
|
||||||
{:right-section-buttons [{:icon :i/search
|
{:right-section-buttons [{:icon :i/options
|
||||||
:background-color (scroll-page/icon-color)}
|
|
||||||
{:icon :i/options
|
|
||||||
:background-color (scroll-page/icon-color)
|
:background-color (scroll-page/icon-color)
|
||||||
:on-press
|
:on-press
|
||||||
#(rf/dispatch
|
#(rf/dispatch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user