fix: banner images/colors in shell (#16239)
This commit is contained in:
parent
c55f12ecf8
commit
645a5b312b
|
@ -246,7 +246,8 @@
|
|||
([color suffix opacity]
|
||||
(let [color-keyword (keyword color)
|
||||
base-color (get-in colors-map
|
||||
[color-keyword suffix])]
|
||||
[color-keyword suffix]
|
||||
color)]
|
||||
(if opacity (alpha base-color (/ opacity 100)) base-color))))))
|
||||
|
||||
(defn custom-color-by-theme
|
||||
|
|
|
@ -375,7 +375,8 @@
|
|||
[keyboard-shown keyboard-height])
|
||||
[rn/keyboard-avoiding-view
|
||||
{:style (style/keyboard-avoiding-container insets)
|
||||
:keyboard-vertical-offset (- (:bottom insets))}
|
||||
:keyboard-vertical-offset (- (:bottom insets))
|
||||
:behavior :height}
|
||||
|
||||
(when header-comp
|
||||
[header-comp
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
;; Mocked Data
|
||||
|
||||
(def banner {:source (resources/get-mock-image :community-banner)})
|
||||
(def banner (resources/get-mock-image :community-banner))
|
||||
(def sticker {:source (resources/get-mock-image :sticker)})
|
||||
(def community-avatar {:source (resources/get-mock-image :community-logo)})
|
||||
(def gif {:source (resources/get-mock-image :gif)})
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
[rn/flat-list
|
||||
{:data data
|
||||
:render-fn render-card
|
||||
:key-fn :id
|
||||
:key-fn :screen-id
|
||||
:header (jump-to-text)
|
||||
:ref #(reset! state/jump-to-list-ref %)
|
||||
:num-columns 2
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
{:width 160
|
||||
:height 160
|
||||
:border-radius 16
|
||||
:overflow :hidden
|
||||
:background-color (colors/alpha background-color 0.4)})
|
||||
|
||||
(defn empty-card
|
||||
|
|
|
@ -235,8 +235,9 @@
|
|||
[rn/view {:style (style/base-container color-50)}
|
||||
(when banner
|
||||
[rn/image
|
||||
{:source (:source banner)
|
||||
:style {:width 160}}])
|
||||
{:source banner
|
||||
:style {:width 160
|
||||
:height 65}}])
|
||||
[rn/view {:style style/secondary-container}
|
||||
[quo/text
|
||||
{:size :paragraph-1
|
||||
|
@ -250,7 +251,10 @@
|
|||
:weight :medium
|
||||
:style style/subtitle}
|
||||
(subtitle type content)]
|
||||
[bottom-container type (merge {:color-50 color-50 :color-60 color-60} content)]]
|
||||
[bottom-container type
|
||||
(merge {:color-50 color-50
|
||||
:color-60 color-60}
|
||||
content)]]
|
||||
(when avatar-params
|
||||
[rn/view {:style style/avatar-container}
|
||||
[avatar avatar-params type customization-color]])
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
[chat id communities primary-name]
|
||||
{:title (:chat-name chat)
|
||||
:avatar-params {}
|
||||
:customization-color (or (:customization-color chat) :primary)
|
||||
:customization-color (or (:color chat) :primary)
|
||||
:content (get-card-content
|
||||
{:chat chat
|
||||
:communities communities
|
||||
|
@ -101,10 +101,11 @@
|
|||
[community id]
|
||||
(let [profile-picture (community-avatar community)]
|
||||
{:title (:name community)
|
||||
:banner {:uri (get-in (:images community) [:banner :uri])}
|
||||
:avatar-params (if profile-picture
|
||||
{:source profile-picture}
|
||||
{:name (:name community)})
|
||||
:customization-color (or (:customization-color community) :primary)
|
||||
:customization-color (or (:color community) :primary)
|
||||
:content {:community-info {:type :permission}}
|
||||
:id id}))
|
||||
|
||||
|
@ -114,6 +115,7 @@
|
|||
(community-card community community-id)
|
||||
{:content {:community-channel {:emoji (:emoji channel)
|
||||
:channel-name (str "# " (:name channel))}}
|
||||
:customization-color (or (:color channel) :primary)
|
||||
:channel-id channel-id}))
|
||||
|
||||
;;;; Subscriptions
|
||||
|
|
Loading…
Reference in New Issue