Implement Onboarding - New intro screen

This commit is contained in:
Parvesh Monu 2024-11-08 14:42:04 +05:30
parent 3e67a0f163
commit bc6de0722f
No known key found for this signature in database
GPG Key ID: F399696520817DE9
4 changed files with 23 additions and 41 deletions

View File

@ -15,12 +15,12 @@
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(def header-text (def header-text
[{:text (i18n/label :t/join-decentralised-communities) [{:text (i18n/label :t/own-your-crypto)
:sub-text (i18n/label :t/participate-in-the-metaverse)} :sub-text (i18n/label :t/use-the-multichain-wallet)}
{:text (i18n/label :t/store-your-asets-on-keycard)
:sub-text (i18n/label :t/be-safe-with-secure-cold-wallet)}
{:text (i18n/label :t/chat-with-friends) {:text (i18n/label :t/chat-with-friends)
:sub-text (i18n/label :t/with-full-encryption)} :sub-text (i18n/label :t/with-full-encryption)}
{:text (i18n/label :t/own-your-crypto)
:sub-text (i18n/label :t/use-the-multichain-wallet)}
{:text (i18n/label :t/discover-web3) {:text (i18n/label :t/discover-web3)
:sub-text (i18n/label :t/explore-the-decentralized-web)}]) :sub-text (i18n/label :t/explore-the-decentralized-web)}])

View File

@ -6,17 +6,10 @@
{:flex 1 {:flex 1
:justify-content :flex-end}) :justify-content :flex-end})
(def text-container
{:flex 1
:flex-direction :row
:flex-wrap :wrap
:align-self :flex-start})
(def terms-privacy-container (def terms-privacy-container
{:flex-direction :row {:padding-horizontal 20
:padding-horizontal 20
:padding-vertical 8 :padding-vertical 8
:gap 8}) :align-items :center})
(def plain-text (def plain-text
{:color colors/white-opa-70}) {:color colors/white-opa-70})

View File

@ -20,20 +20,13 @@
(rf/dispatch [:show-bottom-sheet {:content privacy/privacy-statement :shell? true}])) (rf/dispatch [:show-bottom-sheet {:content privacy/privacy-statement :shell? true}]))
(defn- terms (defn- terms
[terms-accepted? set-terms-accepted?] []
[rn/view {:style style/terms-privacy-container} [rn/view {:style style/terms-privacy-container}
[rn/view [quo/text
{:accessibility-label :terms-privacy-checkbox-container} {:style style/plain-text
[quo/selectors :size :paragraph-2}
{:type :checkbox (str (i18n/label :t/accept-status-tos-prefix))]
:blur? true [rn/view {:style {:flex-direction :row}}
:checked? terms-accepted?
:on-change #(set-terms-accepted? not)}]]
[rn/view {:style style/text-container}
[quo/text
{:style style/plain-text
:size :paragraph-2}
(str (i18n/label :t/accept-status-tos-prefix) " ")]
[quo/text [quo/text
{:on-press show-terms-of-use {:on-press show-terms-of-use
:style style/highlighted-text :style style/highlighted-text
@ -69,35 +62,31 @@
(defn view (defn view
[] []
(let [[terms-accepted? set-terms-accepted?] (rn/use-state false) (let [has-profiles-and-unaccepted-terms? (rf/sub [:profile/has-profiles-and-unaccepted-terms?])]
has-profiles-and-unaccepted-terms? (rf/sub [:profile/has-profiles-and-unaccepted-terms?])]
[rn/view {:style style/page-container} [rn/view {:style style/page-container}
[background/view false] [background/view false]
[quo/bottom-actions [quo/bottom-actions
(cond-> (cond->
{:container-style (style/bottom-actions-container (safe-area/get-bottom)) {:container-style (style/bottom-actions-container (safe-area/get-bottom))
:actions :two-vertical-actions :actions :two-vertical-actions
:description :top :description :bottom
:description-top-text [terms terms-accepted? set-terms-accepted?]} :description-text [terms]}
has-profiles-and-unaccepted-terms? has-profiles-and-unaccepted-terms?
(assoc (assoc
:actions :one-action :actions :one-action
:button-one-label (i18n/label :t/explore-the-new-status) :button-one-label (i18n/label :t/explore-the-new-status)
:button-one-props {:disabled? (not terms-accepted?) :button-one-props {:accessibility-label :explore-new-status
:accessibility-label :explore-new-status
:on-press explore-new-status}) :on-press explore-new-status})
(not has-profiles-and-unaccepted-terms?) (not has-profiles-and-unaccepted-terms?)
(assoc (assoc
:actions :two-vertical-actions :actions :two-vertical-actions
:button-one-label (i18n/label :t/sync-or-recover-profile) :button-one-label (i18n/label :t/log-in)
:button-one-props {:type :dark-grey :button-one-props {:type :dark-grey
:disabled? (not terms-accepted?) :accessibility-label :log-in
:accessibility-label :already-use-status-button
:on-press sync-or-recover-profile} :on-press sync-or-recover-profile}
:button-two-label (i18n/label :t/create-profile) :button-two-label (i18n/label :t/create-profile)
:button-two-props {:accessibility-label :new-to-status-button :button-two-props {:accessibility-label :new-to-status-button
:disabled? (not terms-accepted?)
:on-press create-profile}))] :on-press create-profile}))]
[overlay/view]])) [overlay/view]]))

View File

@ -14,7 +14,7 @@
"accept-and-share-address": "Accept and share address", "accept-and-share-address": "Accept and share address",
"accept-community-rules": "I agree with the community rules", "accept-community-rules": "I agree with the community rules",
"accept-new-chats-from": "Accept new chats from", "accept-new-chats-from": "Accept new chats from",
"accept-status-tos-prefix": "I accept Status", "accept-status-tos-prefix": "By proceeding you accept Status ",
"accepted": "Accepted", "accepted": "Accepted",
"access-existing-keys": "Access existing keys", "access-existing-keys": "Access existing keys",
"access-key": "Access key", "access-key": "Access key",
@ -189,6 +189,7 @@
"backup-through-waku": "Backup through waku", "backup-through-waku": "Backup through waku",
"bad-fees-description": "Your priority fee is below our suggested parameters.", "bad-fees-description": "Your priority fee is below our suggested parameters.",
"balance": "Balance", "balance": "Balance",
"be-safe-with-secure-cold-wallet": "Be safe with secure cold wallet",
"begin-set-up": "Begin setup", "begin-set-up": "Begin setup",
"below-base-fee": "max fee below base fee", "below-base-fee": "max fee below base fee",
"beta": "Beta", "beta": "Beta",
@ -1295,7 +1296,6 @@
"join-a-community": "or join a community", "join-a-community": "or join a community",
"join-as": "Join as {{role}}", "join-as": "Join as {{role}}",
"join-community-to-post": "Join community to post", "join-community-to-post": "Join community to post",
"join-decentralised-communities": "Join Decentralized Communities",
"join-group-chat": "Join group", "join-group-chat": "Join group",
"join-group-chat-description": "{{username}} invited you to join the group {{group-name}}", "join-group-chat-description": "{{username}} invited you to join the group {{group-name}}",
"join-me": "Hey join me on Status: {{url}}", "join-me": "Hey join me on Status: {{url}}",
@ -1893,7 +1893,6 @@
"pairing-please-set-a-name": "Please set a name for your device.", "pairing-please-set-a-name": "Please set a name for your device.",
"pairing-slots-occupied": "All pairing slots are occupied", "pairing-slots-occupied": "All pairing slots are occupied",
"paraswap-error": "Paraswap error: {{paraswap-error}}", "paraswap-error": "Paraswap error: {{paraswap-error}}",
"participate-in-the-metaverse": "Participate in the truly free metaverse",
"passphrase": "Passphrase", "passphrase": "Passphrase",
"password": "Password", "password": "Password",
"password-creation-confirm": "Confirm password", "password-creation-confirm": "Confirm password",
@ -2438,6 +2437,7 @@
"sticker-market": "Sticker market", "sticker-market": "Sticker market",
"storage": "Storage", "storage": "Storage",
"store-confirmations": "Store confirmations", "store-confirmations": "Store confirmations",
"store-your-asets-on-keycard": "Store your assets on Keycard",
"strength-divider-okay-label": "Okay", "strength-divider-okay-label": "Okay",
"strength-divider-strong-label": "Strong", "strength-divider-strong-label": "Strong",
"strength-divider-very-strong-label": "Very strong", "strength-divider-very-strong-label": "Very strong",