Compare commits

..
Author SHA1 Message Date
Omar Basem 502718440c draft 2023-03-21 14:09:06 +04:00
Omar Basem f0cbfd7155 updates 2023-03-21 13:40:14 +04:00
Omar Basem 9c49991bae draft 2023-03-21 13:26:12 +04:00
Omar Basem 1b4c65ea97 draft 2023-03-21 13:03:37 +04:00
Omar Basem 41547a70a5 draft 2023-03-21 12:49:00 +04:00
Omar Basem a030046401 draft 2023-03-21 12:32:56 +04:00
Omar Basem 7557e885d0 draft 2023-03-21 12:12:02 +04:00
Omar Basem 06fa981954 draft 2023-03-21 11:38:02 +04:00
Omar Basem 38522e5180 draft 2023-03-21 11:33:58 +04:00
Omar Basem ecba5ade66 lint 2023-03-21 10:54:53 +04:00
Omar Basem c94508e559 remove image delay 2023-03-21 09:05:33 +04:00
12 changed files with 157 additions and 291 deletions
+12 -6
View File
@@ -417,7 +417,9 @@
TestTargetID = 13B07F861A680F5B00A75B9A; TestTargetID = 13B07F861A680F5B00A75B9A;
}; };
13B07F861A680F5B00A75B9A = { 13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 8B5X2M6H2Y;
LastSwiftMigration = 1140; LastSwiftMigration = 1140;
ProvisioningStyle = Manual;
SystemCapabilities = { SystemCapabilities = {
com.apple.BackgroundModes = { com.apple.BackgroundModes = {
enabled = 1; enabled = 1;
@@ -841,8 +843,9 @@
BUNDLE_ID_SUFFIX = .debug; BUNDLE_ID_SUFFIX = .debug;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements; CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Automatic; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = "Status Debug"; CUSTOM_PRODUCT_NAME = "Status Debug";
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y; DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -895,7 +898,8 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum; PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm; PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE = "9da75626-9594-43d9-a827-0f6d43c28f54";
PROVISIONING_PROFILE_SPECIFIER = "match Development im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@@ -913,8 +917,9 @@
BUNDLE_ID_SUFFIX = ""; BUNDLE_ID_SUFFIX = "";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements; CODE_SIGN_ENTITLEMENTS = StatusIm/StatusIm.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CUSTOM_PRODUCT_NAME = Status; CUSTOM_PRODUCT_NAME = Status;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 8B5X2M6H2Y; DEVELOPMENT_TEAM = 8B5X2M6H2Y;
@@ -959,7 +964,8 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum; PRODUCT_BUNDLE_IDENTIFIER = im.status.ethereum;
PRODUCT_NAME = StatusIm; PRODUCT_NAME = StatusIm;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE = "e2202b12-7a66-4ff7-af3c-a52e35f32dc1";
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc im.status.ethereum";
SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "StatusIm-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
+3 -2
View File
@@ -342,8 +342,9 @@
(rf/defn navigate-to-lightbox (rf/defn navigate-to-lightbox
{:events [:chat.ui/navigate-to-lightbox]} {:events [:chat.ui/navigate-to-lightbox]}
[{:keys [db]} shared-element-id screen-params] [{:keys [db]} shared-element-id screen-params]
(reagent/next-tick #(rf/dispatch [:navigate-to :lightbox screen-params])) (let [updated-db (assoc db :shared-element-id shared-element-id)]
{:db (assoc db :shared-element-id shared-element-id)}) (reagent/next-tick #(rf/dispatch [:navigate-to :lightbox screen-params]))
{:db updated-db}))
(rf/defn exit-lightbox-signal (rf/defn exit-lightbox-signal
{:events [:chat.ui/exit-lightbox-signal]} {:events [:chat.ui/exit-lightbox-signal]}
+86 -106
View File
@@ -3,6 +3,7 @@
[clojure.string :as string] [clojure.string :as string]
[quo2.foundations.colors :as colors] [quo2.foundations.colors :as colors]
[react-native.core :as rn] [react-native.core :as rn]
[react-native.fast-image :as fast-image]
[react-native.navigation :as navigation] [react-native.navigation :as navigation]
[react-native.orientation :as orientation] [react-native.orientation :as orientation]
[react-native.platform :as platform] [react-native.platform :as platform]
@@ -25,7 +26,7 @@
(defn toggle-opacity (defn toggle-opacity
[index {:keys [opacity-value border-value transparent? atoms]} portrait?] [index {:keys [opacity-value border-value transparent? atoms]} portrait?]
(let [{:keys [small-list-ref]} atoms (let [{:keys [small-list-ref]} atoms
opacity (reanimated/get-shared-value opacity-value)] opacity (reanimated/get-shared-value opacity-value)]
(if (= opacity 1) (if (= opacity 1)
(do (do
(when platform/ios? (when platform/ios?
@@ -63,8 +64,8 @@
(orientation/lock-to-portrait "lightbox")) (orientation/lock-to-portrait "lightbox"))
(js/setTimeout #(when @flat-list-ref (js/setTimeout #(when @flat-list-ref
(.scrollToOffset (.scrollToOffset
^js @flat-list-ref ^js @flat-list-ref
#js {:animated false :offset (* (+ item-width seperator-width) @index)})) #js {:animated false :offset (* (+ item-width seperator-width) @index)}))
timeout) timeout)
(when platform/ios? (when platform/ios?
(top-view/animate-rotation result screen-width screen-height insets animations)))) (top-view/animate-rotation result screen-width screen-height insets animations))))
@@ -124,58 +125,57 @@
;; we get `insets` from `screen-params` because trying to consume it from ;; we get `insets` from `screen-params` because trying to consume it from
;; lightbox screen causes lots of problems ;; lightbox screen causes lots of problems
(let [{:keys [messages index insets]} (rf/sub [:get-screen-params]) (let [{:keys [messages index insets]} (rf/sub [:get-screen-params])
render-list (reagent/atom false) atoms {:flat-list-ref (atom nil)
atoms {:flat-list-ref (atom nil) :small-list-ref (atom nil)
:small-list-ref (atom nil) :scroll-index-lock? (atom true)}
:scroll-index-lock? (atom true)}
;; The initial value of data is the image that was pressed (and not the whole album) in order ;; The initial value of data is the image that was pressed (and not the whole album) in order
;; for the transition animation to execute properly, otherwise it would animate towards ;; for the transition animation to execute properly, otherwise it would animate towards
;; outside the screen (even if we have `initialScrollIndex` set). ;; outside the screen (even if we have `initialScrollIndex` set).
data (reagent/atom [(nth messages index)]) data (reagent/atom [(nth messages index)])
scroll-index (reagent/atom index) scroll-index (reagent/atom index)
transparent? (reagent/atom false) transparent? (reagent/atom false)
set-full-height? (reagent/atom false) set-full-height? (reagent/atom false)
window (rf/sub [:dimensions/window]) window (rf/sub [:dimensions/window])
window-width (:width window) window-width (:width window)
window-height (:height window) window-height (:height window)
window-height (if platform/android? window-height (if platform/android?
(+ window-height (:top insets)) (+ window-height (:top insets))
window-height) window-height)
animations {:background-color (anim/use-val "rgba(0,0,0,0)") animations {:background-color (anim/use-val "rgba(0,0,0,0)")
:border (anim/use-val (if platform/ios? 0 12)) :border (anim/use-val (if platform/ios? 0 12))
:opacity (anim/use-val 0) :opacity (anim/use-val 0)
:rotate (anim/use-val "0deg") :rotate (anim/use-val "0deg")
:layout (anim/use-val -10) :layout (anim/use-val -10)
:top-view-y (anim/use-val 0) :top-view-y (anim/use-val 0)
:top-view-x (anim/use-val 0) :top-view-x (anim/use-val 0)
:top-view-width (anim/use-val window-width) :top-view-width (anim/use-val window-width)
:top-view-bg (anim/use-val colors/neutral-100-opa-0) :top-view-bg (anim/use-val colors/neutral-100-opa-0)
:pan-y (anim/use-val 0) :pan-y (anim/use-val 0)
:pan-x (anim/use-val 0)} :pan-x (anim/use-val 0)}
derived {:top-layout (worklet/info-layout (:layout animations) derived {:top-layout (worklet/info-layout (:layout animations)
true) true)
:bottom-layout (worklet/info-layout (:layout animations) :bottom-layout (worklet/info-layout (:layout animations)
false)} false)}
callback (fn [e] callback (fn [e]
(on-viewable-items-changed e scroll-index atoms))] (on-viewable-items-changed e scroll-index atoms))]
(anim/animate (:background-color animations) "rgba(0,0,0,1)") (anim/animate (:background-color animations) "rgba(0,0,0,1)")
(reset! data messages) (reset! data messages)
(orientation/use-device-orientation-change (orientation/use-device-orientation-change
(fn [result] (fn [result]
(if platform/ios? (if platform/ios?
(handle-orientation result scroll-index window-width window-height animations insets atoms) (handle-orientation result scroll-index window-width window-height animations insets atoms)
;; `use-device-orientation-change` will always be called on Android, so need to check ;; `use-device-orientation-change` will always be called on Android, so need to check
(orientation/get-auto-rotate-state (orientation/get-auto-rotate-state
(fn [enabled?] (fn [enabled?]
;; RNN does not support landscape-right ;; RNN does not support landscape-right
(when (and enabled? (not= result orientation/landscape-right)) (when (and enabled? (not= result orientation/landscape-right))
(handle-orientation result (handle-orientation result
scroll-index scroll-index
window-width window-width
window-height window-height
animations animations
insets insets
atoms))))))) atoms)))))))
(rn/use-effect (fn [] (rn/use-effect (fn []
(when @(:flat-list-ref atoms) (when @(:flat-list-ref atoms)
(.scrollToIndex ^js @(:flat-list-ref atoms) (.scrollToIndex ^js @(:flat-list-ref atoms)
@@ -186,11 +186,11 @@
(anim/animate (:border animations) 12)) (anim/animate (:border animations) 12))
(if platform/ios? 250 100)) (if platform/ios? 250 100))
(js/setTimeout #(reset! (:scroll-index-lock? atoms) false) 300) (js/setTimeout #(reset! (:scroll-index-lock? atoms) false) 300)
(js/setTimeout #(reset! render-list true) 500)
(fn [] (fn []
(rf/dispatch [:chat.ui/zoom-out-signal nil]) (rf/dispatch [:chat.ui/zoom-out-signal nil])
(when platform/android? (when platform/android?
(rf/dispatch [:chat.ui/lightbox-scale 1]))))) (rf/dispatch [:chat.ui/lightbox-scale 1])))))
[:f> [:f>
(fn [] (fn []
(let [curr-orientation (or (rf/sub [:lightbox/orientation]) orientation/portrait) (let [curr-orientation (or (rf/sub [:lightbox/orientation]) orientation/portrait)
@@ -204,18 +204,14 @@
window-height window-height
window-width) window-width)
item-width (if (and landscape? platform/ios?) screen-height screen-width)] item-width (if (and landscape? platform/ios?) screen-height screen-width)]
;[rn/view {:style (merge (style/image (+ screen-width seperator-width) screen-height) {:background-color :black})} ;[gesture/flat-list
;[reanimated/fast-image ; {:data [1]
; {:source {:uri (:image (:content (nth messages index)))} ; :horizontal true
; :native-ID :shared-element ; :render-fn (fn [] [rn/view {:style {:width 300 :height 300 :background-color :red}
; :style {:width window-width ; :native-ID :shared-element}])}]
; :height (* (:image-height (nth messages index)) (/ window-width (:image-width (nth messages index))))}
; ;:style (style/image dimensions animations (:border-value args))
; }]]
[reanimated/view [reanimated/view
{:style (reanimated/apply-animations-to-style {:background-color (:background-color {:style (reanimated/apply-animations-to-style {:background-color (:background-color
animations)} animations)}
{:height screen-height})} {:height screen-height})}
;(when-not @transparent? ;(when-not @transparent?
; [top-view/top-view (first messages) insets scroll-index animations derived landscape? ; [top-view/top-view (first messages) insets scroll-index animations derived landscape?
@@ -224,53 +220,37 @@
{:gesture (drag-gesture animations (and landscape? platform/ios?) set-full-height?)} {:gesture (drag-gesture animations (and landscape? platform/ios?) set-full-height?)}
[reanimated/view [reanimated/view
{:style (reanimated/apply-animations-to-style {:style (reanimated/apply-animations-to-style
{:transform [{:translateY (:pan-y animations)} {:transform [{:translateY (:pan-y animations)}
{:translateX (:pan-x animations)}]} {:translateX (:pan-x animations)}]}
{})} {})}
(if @render-list [gesture/flat-list
[gesture/flat-list {:ref #(reset! (:flat-list-ref atoms) %)
{:ref #(reset! (:flat-list-ref atoms) %) :key-fn :message-id
:key-fn :message-id :style {:width (+ screen-width seperator-width)}
:style {:width (+ screen-width seperator-width)} :data @data
:data @data :render-fn (fn [] [rn/view {:style {:width 300 :height 300 :background-color :red}
:render-fn image :native-ID :shared-element}])
:render-data {:opacity-value (:opacity animations) :render-data {:opacity-value (:opacity animations)
:border-value (:border animations) :border-value (:border animations)
:transparent? transparent? :transparent? transparent?
:set-full-height? set-full-height? :set-full-height? set-full-height?
:screen-height screen-height :screen-height screen-height
:screen-width screen-width :screen-width screen-width
:window-height window-height :window-height window-height
:window-width window-width :window-width window-width
:atoms atoms} :atoms atoms}
:initial-scroll-index index :horizontal horizontal?
:horizontal horizontal? :inverted inverted?
:inverted inverted? :paging-enabled true
:paging-enabled true :get-item-layout (fn [_ index] (get-item-layout _ index item-width))
:get-item-layout (fn [_ index] (get-item-layout _ index item-width)) :viewability-config {:view-area-coverage-percent-threshold 50
:viewability-config {:view-area-coverage-percent-threshold 50 :wait-for-interaction true}
:wait-for-interaction true} :shows-vertical-scroll-indicator false
:shows-vertical-scroll-indicator false :shows-horizontal-scroll-indicator false
:shows-horizontal-scroll-indicator false :on-viewable-items-changed callback}]]]
:on-viewable-items-changed callback}]
[rn/view
{:style (style/image (+ screen-width seperator-width) screen-height)}
[rn/view {:style {:width window-width
:height (* (:image-height (nth messages index)) (/ window-width (:image-width (nth messages index))))}}
[reanimated/fast-image
{:source {:uri (:image (:content (nth messages index)))}
:native-ID :shared-element
:style {:border-radius 12
:width window-width
:height (* (:image-height (nth messages index)) (/ window-width (:image-width (nth messages index))))}
;:style (style/image dimensions animations (:border-value args))
}]
]
[rn/view {:style {:width seperator-width}}]]
)
]]
;(when (and (not @transparent?) (not landscape?)) ;(when (and (not @transparent?) (not landscape?))
; [bottom-view/bottom-view messages index scroll-index insets animations derived ; [bottom-view/bottom-view messages index scroll-index insets animations derived
; item-width atoms]) ; item-width atoms])
] ]
))]))]) ))]
))])
@@ -272,7 +272,12 @@
animations animations
@set-full-height? @set-full-height?
(= curr-orientation orientation/portrait))} (= curr-orientation orientation/portrait))}
[reanimated/fast-image [rn/view {:style {:width 300 :height 300 :background-color :red}
{:source {:uri (:image content)} :native-ID :shared-element}]
:native-ID (when focused? :shared-element) ;[reanimated/fast-image
:style (style/image dimensions animations (:border-value args))}]]]))]))]) ; {:source {:uri (:image content)}
; ;:native-ID (when focused? :shared-element)
; :native-ID :shared-element
; :style (style/image dimensions animations (:border-value args))}]
]]
))]))])
@@ -60,9 +60,11 @@
[fast-image/fast-image [fast-image/fast-image
{:style (style/image dimensions index portrait? images-count) {:style (style/image dimensions index portrait? images-count)
:source {:uri (:image (:content item))} :source {:uri (:image (:content item))}
:native-ID (when (and (= shared-element-id (:message-id item)) :native-ID :source-image
(< index constants/max-album-photos)) ;:native-ID (when (and (= shared-element-id (:message-id item))
:shared-element)}] ; (< index constants/max-album-photos))
; :shared-element)
}]
(when (and (> images-count constants/max-album-photos) (when (and (> images-count constants/max-album-photos)
(= index (- constants/max-album-photos 1))) (= index (- constants/max-album-photos 1)))
[rn/view [rn/view
@@ -2,6 +2,7 @@
(:require (:require
[react-native.core :as rn] [react-native.core :as rn]
[react-native.fast-image :as fast-image] [react-native.fast-image :as fast-image]
[react-native.reanimated :as reanimated]
[react-native.safe-area :as safe-area] [react-native.safe-area :as safe-area]
[status-im2.constants :as constants] [status-im2.constants :as constants]
[utils.re-frame :as rf] [utils.re-frame :as rf]
@@ -24,6 +25,7 @@
(let [shared-element-id (rf/sub [:shared-element-id])] (let [shared-element-id (rf/sub [:shared-element-id])]
[rn/touchable-opacity [rn/touchable-opacity
{:active-opacity 1 {:active-opacity 1
;:native-ID :source-image
:key message-id :key message-id
:style {:margin-top (when (pos? index) 10)} :style {:margin-top (when (pos? index) 10)}
:on-long-press on-long-press :on-long-press on-long-press
@@ -34,7 +36,12 @@
:insets insets}])} :insets insets}])}
(when (and (not= text "placeholder") (= index 0)) (when (and (not= text "placeholder") (= index 0))
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]]) [rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
[fast-image/fast-image [rn/view {:style {:width 300 :height 300 :background-color :red}
{:source {:uri (:image content)} :native-ID :shared-element}]
:style (merge dimensions {:border-radius 12}) ;[fast-image/fast-image
:native-ID (when (= shared-element-id message-id) :shared-element)}]]))))]) ; {:source {:uri (:image content)}
; :style (merge dimensions {:border-radius 12})
; :native-ID :shared-element
; ;:native-ID (when (= shared-element-id message-id) :shared-element)
; }]
]))))])
@@ -61,7 +61,7 @@
:source (get-in carousels [@carousel-index :image])}] :source (get-in carousels [@carousel-index :image])}]
[quo/drawer-buttons [quo/drawer-buttons
{:top-card {:on-press (fn [] {:top-card {:on-press (fn []
(rf/dispatch [:navigate-to :sign-in]) (rf/dispatch [:navigate-to :new-to-status])
(rf/dispatch [:hide-terms-of-services-opt-in-screen])) (rf/dispatch [:hide-terms-of-services-opt-in-screen]))
:heading (i18n/label :t/sign-in) :heading (i18n/label :t/sign-in)
:accessibility-label :already-use-status-button} :accessibility-label :already-use-status-button}
@@ -1,14 +0,0 @@
(ns status-im2.contexts.onboarding.sign-in.style
(:require [quo2.foundations.colors :as colors]
[react-native.platform :as platform]))
(def navigation-bar {:height 56})
(def page-container
{:padding-top (if platform/ios? 44 0)
:position :absolute
:top 0
:bottom 0
:left 0
:right 0
:background-color colors/neutral-80-opa-80-blur})
@@ -1,42 +0,0 @@
(ns status-im2.contexts.onboarding.sign-in.view
(:require [quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[status-im2.contexts.onboarding.sign-in.style :as style]
[utils.i18n :as i18n]
[status-im2.contexts.onboarding.common.background.view :as background]
[utils.re-frame :as rf]))
(defn navigation-bar
[]
[rn/view {:style style/navigation-bar}
[quo/page-nav
{:align-mid? true
:mid-section {:type :text-only :main-text ""}
:left-section {:type :blur-bg
:icon :i/arrow-left
:icon-override-theme :dark
:on-press #(rf/dispatch [:navigate-back])}
:right-section-buttons [{:type :blur-bg
:icon :i/info
:icon-override-theme :dark
:on-press #(js/alert "Pending")}]}]])
(defn page
[]
[rn/view {:style style/page-container}
[navigation-bar]
[rn/view {:style {:padding-horizontal 20}}
[quo/text
{:size :heading-1
:weight :semi-bold
:style {:color colors/white}} "Sign in by syncing"]
[quo/button
{:on-press #(rf/dispatch [:navigate-to :syncing-devices])
:style {}} (i18n/label :t/continue)]]])
(defn sign-in
[]
[rn/view {:style {:flex 1}}
[background/view true]
[page]])
@@ -1,14 +0,0 @@
(ns status-im2.contexts.onboarding.syncing.syncing-devices.style
(:require [quo2.foundations.colors :as colors]
[react-native.platform :as platform]))
(def navigation-bar {:height 56})
(def page-container
{:padding-top (if platform/ios? 44 0)
:position :absolute
:top 0
:bottom 0
:left 0
:right 0
:background-color colors/neutral-80-opa-80-blur})
@@ -1,51 +0,0 @@
(ns status-im2.contexts.onboarding.syncing.syncing-devices.view
(:require [quo2.core :as quo]
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[status-im2.contexts.onboarding.syncing.syncing-devices.style :as style]
[utils.i18n :as i18n]
[status-im2.contexts.onboarding.common.background.view :as background]
[utils.re-frame :as rf]))
(defn navigation-bar
[]
[rn/view {:style style/navigation-bar}
[quo/page-nav
{:align-mid? true
:mid-section {:type :text-only :main-text ""}
:left-section {:type :blur-bg
:icon :i/arrow-left
:icon-override-theme :dark
:on-press #(rf/dispatch [:navigate-back])}
:right-section-buttons [{:type :blur-bg
:icon :i/info
:icon-override-theme :dark
:on-press #(js/alert "Pending")}]}]])
(defn page
[]
[rn/view {:style style/page-container}
[navigation-bar]
[rn/view {:style {:padding-horizontal 20}}
[quo/text
{:size :heading-1
:weight :semi-bold
:style {:color colors/white}} "Syncing devices..."]
[quo/text
{:size :heading-2
:weight :semi-bold
:style {:color colors/white}} "will show sync complete if successful"]
[quo/text
{:size :heading-2
:weight :semi-bold
:style {:color colors/white}} "will show sync failed if unsuccessful"]
[quo/button
{:on-press #(rf/dispatch [:navigate-to :enable-notifications])
:style {}} (i18n/label :t/continue)]]])
(defn syncing-devices
[]
[rn/view {:style {:flex 1}}
[background/view true]
[page]])
+30 -44
View File
@@ -1,30 +1,27 @@
(ns status-im2.navigation.screens (ns status-im2.navigation.screens
(:require (:require [utils.i18n :as i18n] ;; TODO remove when not used anymore
[utils.i18n :as i18n] ;; TODO remove when not used anymore [quo2.foundations.colors :as colors]
[quo2.foundations.colors :as colors] [react-native.platform :as platform]
[react-native.platform :as platform] [status-im.ui.screens.screens :as old-screens]
[status-im.ui.screens.screens :as old-screens] [status-im2.config :as config]
[status-im2.config :as config] [status-im2.contexts.activity-center.view :as activity-center]
[status-im2.contexts.activity-center.view :as activity-center] [status-im2.contexts.add-new-contact.views :as add-new-contact]
[status-im2.contexts.add-new-contact.views :as add-new-contact] [status-im2.contexts.chat.lightbox.view :as lightbox]
[status-im2.contexts.chat.lightbox.view :as lightbox] [status-im2.contexts.chat.messages.view :as chat]
[status-im2.contexts.chat.messages.view :as chat] [status-im2.contexts.chat.photo-selector.album-selector.view :as album-selector]
[status-im2.contexts.chat.photo-selector.album-selector.view :as album-selector] [status-im2.contexts.chat.photo-selector.view :as photo-selector]
[status-im2.contexts.chat.photo-selector.view :as photo-selector] [status-im2.contexts.communities.discover.view :as communities.discover]
[status-im2.contexts.communities.discover.view :as communities.discover] [status-im2.contexts.communities.overview.view :as communities.overview]
[status-im2.contexts.communities.overview.view :as communities.overview] [status-im2.contexts.onboarding.common.intro.view :as intro]
[status-im2.contexts.onboarding.common.intro.view :as intro] [status-im2.contexts.onboarding.create-password.view :as create-password]
[status-im2.contexts.onboarding.create-password.view :as create-password] [status-im2.contexts.onboarding.create-profile.view :as create-profile]
[status-im2.contexts.onboarding.create-profile.view :as create-profile] [status-im2.contexts.onboarding.enable-biometrics.view :as enable-biometrics]
[status-im2.contexts.onboarding.enable-biometrics.view :as enable-biometrics] [status-im2.contexts.onboarding.enable-notifications.view :as enable-notifications]
[status-im2.contexts.onboarding.enable-notifications.view :as enable-notifications] [status-im2.contexts.onboarding.new-to-status.view :as new-to-status]
[status-im2.contexts.onboarding.new-to-status.view :as new-to-status] [status-im2.contexts.onboarding.profiles.view :as profiles]
[status-im2.contexts.onboarding.sign-in.view :as sign-in] [status-im2.contexts.quo-preview.main :as quo.preview]
[status-im2.contexts.onboarding.syncing.syncing-devices.view :as syncing-devices] [status-im2.contexts.shell.view :as shell]
[status-im2.contexts.onboarding.profiles.view :as profiles] [status-im2.contexts.syncing.view :as settings-syncing]))
[status-im2.contexts.quo-preview.main :as quo.preview]
[status-im2.contexts.shell.view :as shell]
[status-im2.contexts.syncing.view :as settings-syncing]))
(def components (def components
[]) [])
@@ -67,7 +64,8 @@
{:name :lightbox {:name :lightbox
:insets {:top false :bottom false} :insets {:top false :bottom false}
:options {:topBar {:visible false} :options {
:topBar {:visible false}
:statusBar {:backgroundColor :transparent :statusBar {:backgroundColor :transparent
:style :light :style :light
:animate true :animate true
@@ -78,13 +76,15 @@
:backgroundColor :transparent} :backgroundColor :transparent}
:animations {:push {:sharedElementTransitions [{:fromId :shared-element :animations {:push {:sharedElementTransitions [{:fromId :shared-element
:toId :shared-element :toId :shared-element
:interpolation {:type :decelerate :interpolation {:type
:decelerate
:factor 1.5}}]} :factor 1.5}}]}
:pop {:sharedElementTransitions [{:fromId :shared-element :pop {:sharedElementTransitions [{:fromId :shared-element
:toId :shared-element :toId :shared-element
:interpolation {:type :interpolation {:type
:decelerate :decelerate
:factor 1.5}}]}}} :factor 1.5}}]}
}}
:component lightbox/lightbox} :component lightbox/lightbox}
{:name :photo-selector {:name :photo-selector
:options {:topBar {:visible false}} :options {:topBar {:visible false}}
@@ -151,21 +151,7 @@
:topBar {:visible false} :topBar {:visible false}
:navigationBar {:backgroundColor colors/black}} :navigationBar {:backgroundColor colors/black}}
:insets {:top false} :insets {:top false}
:component enable-notifications/enable-notifications} :component enable-notifications/enable-notifications}]
{:name :sign-in
:options {:statusBar {:style :light}
:topBar {:visible false}
:navigationBar {:backgroundColor colors/black}}
:insets {:top false}
:component sign-in/sign-in}
{:name :syncing-devices
:options {:statusBar {:style :light}
:topBar {:visible false}
:navigationBar {:backgroundColor colors/black}}
:insets {:top false}
:component syncing-devices/syncing-devices}]
(when config/quo-preview-enabled? (when config/quo-preview-enabled?
quo.preview/screens) quo.preview/screens)