[#17423] fix: update sync flow (#17731)

This commit is contained in:
Mohsen 2023-10-27 11:16:56 +03:00 committed by GitHub
parent 5920c35677
commit 2aeafa30bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -46,7 +46,8 @@
:no-contacts-to-invite-light (js/require "../resources/images/ui2/no-contacts-to-invite-light.png") :no-contacts-to-invite-light (js/require "../resources/images/ui2/no-contacts-to-invite-light.png")
:no-contacts-to-invite-dark (js/require "../resources/images/ui2/no-contacts-to-invite-dark.png") :no-contacts-to-invite-dark (js/require "../resources/images/ui2/no-contacts-to-invite-dark.png")
:no-notifications-light (js/require "../resources/images/ui2/no-notifications-light.png") :no-notifications-light (js/require "../resources/images/ui2/no-notifications-light.png")
:no-notifications-dark (js/require "../resources/images/ui2/no-notifications-dark.png")}) :no-notifications-dark (js/require "../resources/images/ui2/no-notifications-dark.png")
:welcome-illustration (js/require "../resources/images/ui2/welcome_illustration.png")})
(def ui-themed (def ui-themed
{:no-messages {:no-messages

View File

@ -1,6 +1,4 @@
(ns status-im2.contexts.onboarding.welcome.style (ns status-im2.contexts.onboarding.welcome.style)
(:require
[quo.foundations.colors :as colors]))
(def default-margin 20) (def default-margin 20)
@ -9,16 +7,27 @@
{:flex 1 {:flex 1
:padding-top (:top insets)}) :padding-top (:top insets)})
(def page-illustration (defn page-illustration
{:flex 1 [width]
:background-color colors/danger-50 {:resize-mode :stretch
:align-items :center :resize-method :scale
:margin-horizontal default-margin :width width
:border-radius 20 :margin-top 12
:margin-top default-margin :margin-bottom 4})
:justify-content :center})
(defn buttons (defn buttons
[insets] [insets]
{:margin default-margin {:position :absolute
:margin-bottom (+ 14 (:bottom insets))}) :left 0
:right 0
:padding-left default-margin
:padding-right default-margin
:bottom (+ 12 (:bottom insets))})
(def bottom-shadow
{:position :absolute
:height 64
:top 0
:bottom 0
:left 0
:right 0})

View File

@ -1,9 +1,12 @@
(ns status-im2.contexts.onboarding.welcome.view (ns status-im2.contexts.onboarding.welcome.view
(:require (:require
[quo.core :as quo] [quo.core :as quo]
[quo.foundations.colors :as colors]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[react-native.core :as rn] [react-native.core :as rn]
[react-native.linear-gradient :as linear-gradient]
[react-native.safe-area :as safe-area] [react-native.safe-area :as safe-area]
[status-im2.common.resources :as resources]
[status-im2.constants :as constants] [status-im2.constants :as constants]
[status-im2.contexts.onboarding.welcome.style :as style] [status-im2.contexts.onboarding.welcome.style :as style]
[utils.i18n :as i18n] [utils.i18n :as i18n]
@ -30,6 +33,7 @@
[] []
(let [profile-color (rf/sub [:onboarding-2/customization-color]) (let [profile-color (rf/sub [:onboarding-2/customization-color])
{:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status]) {:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status])
window (rf/sub [:dimensions/window])
insets (safe-area/get-insets)] insets (safe-area/get-insets)]
[rn/view {:style (style/page-container insets)} [rn/view {:style (style/page-container insets)}
(when (nil? status-type) (when (nil? status-type)
@ -40,10 +44,14 @@
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press #(rf/dispatch [:navigate-back-within-stack :enable-notifications])}] :on-press #(rf/dispatch [:navigate-back-within-stack :enable-notifications])}]
[page-title] [page-title]
[rn/view {:style style/page-illustration} [rn/image
[quo/text {:style (style/page-illustration (:width window))
"Illustration here"]] :source (resources/get-image :welcome-illustration)}]
[rn/view {:style (style/buttons insets)} [rn/view {:style (style/buttons insets)}
(when rn/small-screen?
[linear-gradient/linear-gradient
{:style style/bottom-shadow
:colors [colors/neutral-100-opa-0 colors/neutral-100-opa-80]}])
[quo/button [quo/button
{:on-press (fn [] {:on-press (fn []
(rf/dispatch [:init-root :shell-stack]) (rf/dispatch [:init-root :shell-stack])

View File

@ -191,7 +191,7 @@
{:size :paragraph-2 {:size :paragraph-2
:weight :regular :weight :regular
:style style/viewfinder-text} :style style/viewfinder-text}
(i18n/label :t/ensure-qr-code-is-in-focus-to-scan)]])) (i18n/label :t/ensure-both-devices-are-on-the-same-network)]]))
(defn- scan-qr-code-tab (defn- scan-qr-code-tab
[qr-view-finder] [qr-view-finder]

View File

@ -2128,6 +2128,7 @@
"ensure-qr-code-in-focus-to-scan": "Ensure that the QR code is in focus to scan", "ensure-qr-code-in-focus-to-scan": "Ensure that the QR code is in focus to scan",
"i-dont-have-status-on-another-device": "I dont have Status on another device", "i-dont-have-status-on-another-device": "I dont have Status on another device",
"ensure-qr-code-is-in-focus-to-scan": "Ensure that the QR code is in focus to scan", "ensure-qr-code-is-in-focus-to-scan": "Ensure that the QR code is in focus to scan",
"ensure-both-devices-are-on-the-same-network": "Ensure both devices are on the same network",
"error-this-is-not-a-sync-qr-code": "Oops! This is not a sync QR code", "error-this-is-not-a-sync-qr-code": "Oops! This is not a sync QR code",
"error-syncing-connection-failed": "Oops! Connection failed. Try again", "error-syncing-connection-failed": "Oops! Connection failed. Try again",
"camera-permission-denied": "Permission denied", "camera-permission-denied": "Permission denied",