Replace placeholders on "Jump to" page (#16501)
This commit is contained in:
parent
4decba8d00
commit
4d7cf3e94e
|
@ -4,6 +4,7 @@
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[status-im2.common.home.style :as style]
|
[status-im2.common.home.style :as style]
|
||||||
|
[status-im.multiaccounts.core :as multiaccounts]
|
||||||
[status-im2.common.plus-button.view :as plus-button]
|
[status-im2.common.plus-button.view :as plus-button]
|
||||||
[status-im2.constants :as constants]
|
[status-im2.constants :as constants]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
|
@ -117,11 +118,15 @@
|
||||||
props
|
props
|
||||||
{:type quo/button types
|
{:type quo/button types
|
||||||
:style override-style
|
:style override-style
|
||||||
:avatar user-avatar
|
|
||||||
:search? When non-nil, show search button}
|
:search? When non-nil, show search button}
|
||||||
"
|
"
|
||||||
[{:keys [type style avatar search?]
|
[{:keys [type style search?]
|
||||||
:or {type :default}}]
|
:or {type :default}}]
|
||||||
[rn/view {:style (merge style/top-nav-container style)}
|
(let [account (rf/sub [:profile/multiaccount])
|
||||||
[left-section {:avatar avatar}]
|
customization-color (rf/sub [:profile/customization-color])
|
||||||
[right-section {:button-type type :search? search?}]])
|
avatar {:customization-color customization-color
|
||||||
|
:full-name (multiaccounts/displayed-name account)
|
||||||
|
:profile-picture (multiaccounts/displayed-photo account)}]
|
||||||
|
[rn/view {:style (merge style/top-nav-container style)}
|
||||||
|
[left-section {:avatar avatar}]
|
||||||
|
[right-section {:button-type type :search? search?}]]))
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
[react-native.safe-area :as safe-area]
|
[react-native.safe-area :as safe-area]
|
||||||
[status-im.multiaccounts.core :as multiaccounts]
|
|
||||||
[status-im2.common.contact-list-item.view :as contact-list-item]
|
[status-im2.common.contact-list-item.view :as contact-list-item]
|
||||||
[status-im2.common.contact-list.view :as contact-list]
|
[status-im2.common.contact-list.view :as contact-list]
|
||||||
[status-im2.common.home.actions.view :as actions]
|
[status-im2.common.home.actions.view :as actions]
|
||||||
|
@ -121,7 +120,6 @@
|
||||||
[]
|
[]
|
||||||
(let [pending-contact-requests (rf/sub [:activity-center/pending-contact-requests])
|
(let [pending-contact-requests (rf/sub [:activity-center/pending-contact-requests])
|
||||||
selected-tab (or (rf/sub [:messages-home/selected-tab]) :tab/recent)
|
selected-tab (or (rf/sub [:messages-home/selected-tab]) :tab/recent)
|
||||||
account (rf/sub [:profile/multiaccount])
|
|
||||||
customization-color (rf/sub [:profile/customization-color])
|
customization-color (rf/sub [:profile/customization-color])
|
||||||
top (safe-area/get-top)]
|
top (safe-area/get-top)]
|
||||||
[:<>
|
[:<>
|
||||||
|
@ -138,11 +136,7 @@
|
||||||
(theme/theme-value colors/white colors/neutral-95-opa-70)
|
(theme/theme-value colors/white colors/neutral-95-opa-70)
|
||||||
(when (colors/dark?)
|
(when (colors/dark?)
|
||||||
colors/neutral-95-opa-70))}])
|
colors/neutral-95-opa-70))}])
|
||||||
[common.home/top-nav
|
[common.home/top-nav {:type :grey}]
|
||||||
{:type :grey
|
|
||||||
:avatar {:customization-color customization-color
|
|
||||||
:full-name (multiaccounts/displayed-name account)
|
|
||||||
:profile-picture (multiaccounts/displayed-photo account)}}]
|
|
||||||
[common.home/title-column
|
[common.home/title-column
|
||||||
{:label (i18n/label :t/messages)
|
{:label (i18n/label :t/messages)
|
||||||
:handler #(rf/dispatch [:show-bottom-sheet {:content home.sheet/new-chat}])
|
:handler #(rf/dispatch [:show-bottom-sheet {:content home.sheet/new-chat}])
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
[react-native.safe-area :as safe-area]
|
[react-native.safe-area :as safe-area]
|
||||||
[status-im.multiaccounts.core :as multiaccounts]
|
|
||||||
[status-im2.common.home.view :as common.home]
|
[status-im2.common.home.view :as common.home]
|
||||||
[status-im2.common.resources :as resources]
|
[status-im2.common.resources :as resources]
|
||||||
[status-im2.contexts.communities.actions.community-options.view :as options]
|
[status-im2.contexts.communities.actions.community-options.view :as options]
|
||||||
|
@ -73,7 +72,6 @@
|
||||||
[]
|
[]
|
||||||
(let [selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
|
(let [selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
|
||||||
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
|
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
|
||||||
account (rf/sub [:profile/multiaccount])
|
|
||||||
customization-color (rf/sub [:profile/customization-color])
|
customization-color (rf/sub [:profile/customization-color])
|
||||||
selected-items (case selected-tab
|
selected-items (case selected-tab
|
||||||
:joined joined
|
:joined joined
|
||||||
|
@ -103,11 +101,7 @@
|
||||||
(theme/theme-value colors/white colors/neutral-95-opa-70)
|
(theme/theme-value colors/white colors/neutral-95-opa-70)
|
||||||
(when (colors/dark?)
|
(when (colors/dark?)
|
||||||
colors/neutral-95-opa-70))}])
|
colors/neutral-95-opa-70))}])
|
||||||
[common.home/top-nav
|
[common.home/top-nav {:type :grey}]
|
||||||
{:type :grey
|
|
||||||
:avatar {:customization-color customization-color
|
|
||||||
:full-name (multiaccounts/displayed-name account)
|
|
||||||
:profile-picture (multiaccounts/displayed-photo account)}}]
|
|
||||||
[common.home/title-column
|
[common.home/title-column
|
||||||
{:label (i18n/label :t/communities)
|
{:label (i18n/label :t/communities)
|
||||||
:handler #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])
|
:handler #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
[blur/view (bottom-tabs/blur-overlay-params style/top-nav-blur-overlay)])]))
|
[blur/view (bottom-tabs/blur-overlay-params style/top-nav-blur-overlay)])]))
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[customization-color]
|
[]
|
||||||
(let [switcher-cards (rf/sub [:shell/sorted-switcher-cards])
|
(let [switcher-cards (rf/sub [:shell/sorted-switcher-cards])
|
||||||
width (rf/sub [:dimensions/window-width])
|
width (rf/sub [:dimensions/window-width])
|
||||||
top (safe-area/get-top)
|
top (safe-area/get-top)
|
||||||
|
@ -110,7 +110,6 @@
|
||||||
[jump-to-list switcher-cards shell-margin]
|
[jump-to-list switcher-cards shell-margin]
|
||||||
[top-nav-blur-overlay top]
|
[top-nav-blur-overlay top]
|
||||||
[common.home/top-nav
|
[common.home/top-nav
|
||||||
{:type :shell
|
{:type :shell
|
||||||
:avatar {:customization-color customization-color}
|
:style {:margin-top top
|
||||||
:style {:margin-top top
|
:z-index 2}}]]]))
|
||||||
:z-index 2}}]]]))
|
|
||||||
|
|
|
@ -42,15 +42,14 @@
|
||||||
|
|
||||||
(defn f-shell-stack
|
(defn f-shell-stack
|
||||||
[]
|
[]
|
||||||
(let [shared-values (shared-values/calculate-and-set-shared-values)
|
(let [shared-values (shared-values/calculate-and-set-shared-values)]
|
||||||
customization-color (rf/sub [:profile/customization-color])]
|
|
||||||
(rn/use-effect
|
(rn/use-effect
|
||||||
(fn []
|
(fn []
|
||||||
(rn/hw-back-add-listener navigate-back-handler)
|
(rn/hw-back-add-listener navigate-back-handler)
|
||||||
#(rn/hw-back-remove-listener navigate-back-handler))
|
#(rn/hw-back-remove-listener navigate-back-handler))
|
||||||
[])
|
[])
|
||||||
[:<>
|
[:<>
|
||||||
[jump-to-screen/view customization-color]
|
[jump-to-screen/view]
|
||||||
[:f> bottom-tabs/f-bottom-tabs]
|
[:f> bottom-tabs/f-bottom-tabs]
|
||||||
[:f> home-stack/f-home-stack]
|
[:f> home-stack/f-home-stack]
|
||||||
[floating-button shared-values]
|
[floating-button shared-values]
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
(let [images (:images contact)
|
(let [images (:images contact)
|
||||||
profile-picture (:uri (or (:thumbnail images) (:large images) (first images)))]
|
profile-picture (:uri (or (:thumbnail images) (:large images) (first images)))]
|
||||||
{:title (first names)
|
{:title (first names)
|
||||||
:avatar-params {:full-name (last names)
|
:avatar-params {:full-name (first names)
|
||||||
:profile-picture (when profile-picture
|
:profile-picture (when profile-picture
|
||||||
(str profile-picture "&addRing=0"))}
|
(str profile-picture "&addRing=0"))}
|
||||||
:customization-color (or (:customization-color contact) :primary)
|
:customization-color (or (:customization-color contact) :primary)
|
||||||
|
|
Loading…
Reference in New Issue