diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d65479ef4c2..d80e56cf568 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -772,7 +772,7 @@ SPEC CHECKSUMS: RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467 RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071 - RNReanimated: 43adb0307a62c1ce9694f36f124ca3b51a15272a + RNReanimated: aaa16b8dc7b9552ead99d5c78a35a3066b2838a4 RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8 RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9 diff --git a/resources/images/icons/appearance@2x.png b/resources/images/icons/appearance@2x.png old mode 100755 new mode 100644 index 071d38497cd..5d6c8bcc09a Binary files a/resources/images/icons/appearance@2x.png and b/resources/images/icons/appearance@2x.png differ diff --git a/resources/images/icons/appearance@3x.png b/resources/images/icons/appearance@3x.png old mode 100755 new mode 100644 index 7c1cb325b61..6a974062aaa Binary files a/resources/images/icons/appearance@3x.png and b/resources/images/icons/appearance@3x.png differ diff --git a/resources/images/icons/communities@2x.png b/resources/images/icons/communities@2x.png index d4d9582d620..cc60f26d06f 100644 Binary files a/resources/images/icons/communities@2x.png and b/resources/images/icons/communities@2x.png differ diff --git a/resources/images/icons/communities@3x.png b/resources/images/icons/communities@3x.png index 7187477a167..5568694af42 100644 Binary files a/resources/images/icons/communities@3x.png and b/resources/images/icons/communities@3x.png differ diff --git a/resources/images/icons/dapps@2x.png b/resources/images/icons/dapps@2x.png new file mode 100644 index 00000000000..6dc8805ab62 Binary files /dev/null and b/resources/images/icons/dapps@2x.png differ diff --git a/resources/images/icons/dapps@3x.png b/resources/images/icons/dapps@3x.png new file mode 100644 index 00000000000..56a83257cc6 Binary files /dev/null and b/resources/images/icons/dapps@3x.png differ diff --git a/resources/images/icons/edit_profile@2x.png b/resources/images/icons/edit_profile@2x.png new file mode 100644 index 00000000000..12a18a3e1ec Binary files /dev/null and b/resources/images/icons/edit_profile@2x.png differ diff --git a/resources/images/icons/edit_profile@3x.png b/resources/images/icons/edit_profile@3x.png new file mode 100644 index 00000000000..d54e33f0386 Binary files /dev/null and b/resources/images/icons/edit_profile@3x.png differ diff --git a/resources/images/icons/external@2x.png b/resources/images/icons/external@2x.png new file mode 100644 index 00000000000..25dd8e4d043 Binary files /dev/null and b/resources/images/icons/external@2x.png differ diff --git a/resources/images/icons/external@3x.png b/resources/images/icons/external@3x.png new file mode 100644 index 00000000000..c1532f0cc4e Binary files /dev/null and b/resources/images/icons/external@3x.png differ diff --git a/resources/images/icons/globe@2x.png b/resources/images/icons/globe@2x.png new file mode 100644 index 00000000000..1d0f4a64b80 Binary files /dev/null and b/resources/images/icons/globe@2x.png differ diff --git a/resources/images/icons/globe@3x.png b/resources/images/icons/globe@3x.png new file mode 100644 index 00000000000..805805cc037 Binary files /dev/null and b/resources/images/icons/globe@3x.png differ diff --git a/resources/images/icons/key_profile@2x.png b/resources/images/icons/key_profile@2x.png new file mode 100644 index 00000000000..5b75a939544 Binary files /dev/null and b/resources/images/icons/key_profile@2x.png differ diff --git a/resources/images/icons/key_profile@3x.png b/resources/images/icons/key_profile@3x.png new file mode 100644 index 00000000000..7289952ebbf Binary files /dev/null and b/resources/images/icons/key_profile@3x.png differ diff --git a/resources/images/icons/keycard_profile@2x.png b/resources/images/icons/keycard_profile@2x.png new file mode 100644 index 00000000000..ba13b45aed3 Binary files /dev/null and b/resources/images/icons/keycard_profile@2x.png differ diff --git a/resources/images/icons/keycard_profile@3x.png b/resources/images/icons/keycard_profile@3x.png new file mode 100644 index 00000000000..fd9e471ac56 Binary files /dev/null and b/resources/images/icons/keycard_profile@3x.png differ diff --git a/resources/images/icons/log_out@2x.png b/resources/images/icons/log_out@2x.png old mode 100755 new mode 100644 index a7b97680e1e..3cb22f597a2 Binary files a/resources/images/icons/log_out@2x.png and b/resources/images/icons/log_out@2x.png differ diff --git a/resources/images/icons/log_out@3x.png b/resources/images/icons/log_out@3x.png old mode 100755 new mode 100644 index f09ee825e82..d5da80e683e Binary files a/resources/images/icons/log_out@3x.png and b/resources/images/icons/log_out@3x.png differ diff --git a/resources/images/icons/message_profile@2x.png b/resources/images/icons/message_profile@2x.png new file mode 100644 index 00000000000..e61cbbe73b9 Binary files /dev/null and b/resources/images/icons/message_profile@2x.png differ diff --git a/resources/images/icons/message_profile@3x.png b/resources/images/icons/message_profile@3x.png new file mode 100644 index 00000000000..cc369a28c82 Binary files /dev/null and b/resources/images/icons/message_profile@3x.png differ diff --git a/resources/images/icons/mobile_profile@2x.png b/resources/images/icons/mobile_profile@2x.png new file mode 100644 index 00000000000..cc75f7d27fe Binary files /dev/null and b/resources/images/icons/mobile_profile@2x.png differ diff --git a/resources/images/icons/mobile_profile@3x.png b/resources/images/icons/mobile_profile@3x.png new file mode 100644 index 00000000000..94ee77ac4cb Binary files /dev/null and b/resources/images/icons/mobile_profile@3x.png differ diff --git a/resources/images/icons/multi_profile@2x.png b/resources/images/icons/multi_profile@2x.png new file mode 100644 index 00000000000..20c79a97c7d Binary files /dev/null and b/resources/images/icons/multi_profile@2x.png differ diff --git a/resources/images/icons/multi_profile@3x.png b/resources/images/icons/multi_profile@3x.png new file mode 100644 index 00000000000..87e488d80c0 Binary files /dev/null and b/resources/images/icons/multi_profile@3x.png differ diff --git a/resources/images/icons/notification@2x.png b/resources/images/icons/notification@2x.png old mode 100755 new mode 100644 index 3f2eeb1b694..7a67164da35 Binary files a/resources/images/icons/notification@2x.png and b/resources/images/icons/notification@2x.png differ diff --git a/resources/images/icons/notification@3x.png b/resources/images/icons/notification@3x.png old mode 100755 new mode 100644 index 1b456e0bd16..5e203a617c1 Binary files a/resources/images/icons/notification@3x.png and b/resources/images/icons/notification@3x.png differ diff --git a/resources/images/icons/share@2x.ios.png b/resources/images/icons/share@2x.ios.png old mode 100755 new mode 100644 index aeb279a80fb..d01e97520d8 Binary files a/resources/images/icons/share@2x.ios.png and b/resources/images/icons/share@2x.ios.png differ diff --git a/resources/images/icons/share@3x.ios.png b/resources/images/icons/share@3x.ios.png old mode 100755 new mode 100644 index 122680892d3..75e69f7811f Binary files a/resources/images/icons/share@3x.ios.png and b/resources/images/icons/share@3x.ios.png differ diff --git a/resources/images/icons/syncing@2x.png b/resources/images/icons/syncing@2x.png new file mode 100644 index 00000000000..35f7f17718f Binary files /dev/null and b/resources/images/icons/syncing@2x.png differ diff --git a/resources/images/icons/syncing@3x.png b/resources/images/icons/syncing@3x.png new file mode 100644 index 00000000000..ab466583125 Binary files /dev/null and b/resources/images/icons/syncing@3x.png differ diff --git a/resources/images/icons/wallet_profile@2x.png b/resources/images/icons/wallet_profile@2x.png new file mode 100644 index 00000000000..f83b58f45b7 Binary files /dev/null and b/resources/images/icons/wallet_profile@2x.png differ diff --git a/resources/images/icons/wallet_profile@3x.png b/resources/images/icons/wallet_profile@3x.png new file mode 100644 index 00000000000..0e245261c92 Binary files /dev/null and b/resources/images/icons/wallet_profile@3x.png differ diff --git a/src/quo/components/header.cljs b/src/quo/components/header.cljs index 9be8106cf66..782e933b3e3 100644 --- a/src/quo/components/header.cljs +++ b/src/quo/components/header.cljs @@ -80,7 +80,7 @@ :flex 1}) (defn header-action - [{:keys [icon label on-press disabled accessibility-label]}] + [{:keys [icon label on-press disabled accessibility-label style]}] [button/button (merge {:on-press on-press :disabled disabled} @@ -89,7 +89,8 @@ :theme :icon} label {:type :secondary}) (when accessibility-label - {:accessibility-label accessibility-label})) + {:accessibility-label accessibility-label}) + {:style style}) (cond icon icon label label)]) diff --git a/src/quo/components/list/item.cljs b/src/quo/components/list/item.cljs index 63160a2fb77..c50083224ce 100644 --- a/src/quo/components/list/item.cljs +++ b/src/quo/components/list/item.cljs @@ -90,9 +90,11 @@ (defn title-column [{:keys [title text-color subtitle subtitle-max-lines subtitle-secondary title-accessibility-label size text-size title-text-weight + title-style right-side-present?]}] [rn/view {:style (merge (:tiny spacing/padding-horizontal) + title-style ;; make left-side title grow if nothing is present on right-side (when-not right-side-present? {:flex 1 @@ -215,8 +217,10 @@ (defn list-item [{:keys [theme accessory disabled subtitle-max-lines icon icon-container-style + icon-size left-side-alignment icon-color icon-bg-color title subtitle subtitle-secondary active on-press on-long-press chevron size text-size + title-style accessory-text accessibility-label title-accessibility-label accessory-style haptic-feedback haptic-type error animated animated-accessory? title-text-weight container-style @@ -267,10 +271,12 @@ [container {:size size :container-style container-style} [left-side {:icon-color icon-color + :icon-size icon-size :text-color (if on-press text-color (:text-color (themes :main))) :left-side-alignment left-side-alignment + :title-style title-style :icon-bg-color icon-bg-color :title-accessibility-label title-accessibility-label :icon icon diff --git a/src/status_im/ui/screens/screens.cljs b/src/status_im/ui/screens/screens.cljs index 82be0f7398f..eca1511a223 100644 --- a/src/status_im/ui/screens/screens.cljs +++ b/src/status_im/ui/screens/screens.cljs @@ -10,6 +10,7 @@ [status-im.ui.screens.bootnodes-settings.edit-bootnode.views :as edit-bootnode] [status-im.ui.screens.bootnodes-settings.views :as bootnodes-settings] [status-im.ui.screens.browser.bookmarks.views :as bookmarks] + [status-im.ui.screens.browser.stack :as browser] [status-im.ui.screens.bug-report :as bug-report] [status-im.ui.screens.communities.create :as communities.create] [status-im.ui.screens.communities.import :as communities.import] @@ -51,7 +52,6 @@ [status-im.ui.screens.profile.contact.views :as contact] [status-im.ui.screens.profile.group-chat.views :as profile.group-chat] [status-im.ui.screens.profile.seed.views :as profile.seed] - [status-im.ui.screens.profile.user.views :as profile.user] [status-im.ui.screens.progress.views :as progress] [status-im.ui.screens.qr-scanner.views :as qr-scanner] [status-im.ui.screens.reset-password.views :as reset-password] @@ -110,7 +110,6 @@ :component stickers/pack} ;; Community (legacy only for e2e needed) - {:name :community-members ;;TODO custom subtitle :options {:insets {:top? true}} @@ -221,9 +220,6 @@ ;;PROFILE - {:name :my-profile - :options {:topBar {:visible false}} - :component profile.user/my-profile} {:name :contacts-list :options {:topBar {:title {:text (i18n/label :t/contacts)}} :insets {:top? true}} @@ -530,6 +526,11 @@ :options {:insets {:bottom? true :top? true}} :component bookmarks/new-bookmark} + {:name :browser + ;;TODO dynamic title + :options {:insets {:bottom? false + :top? false}} + :component browser/browser-stack} ;Profile {:name :profile @@ -661,13 +662,11 @@ {:name :change-pairing-code :insets {:bottom? true} :component keycard.pairing/change-pairing-code} - {:name :show-all-connections :options {:topBar {:title {:text (i18n/label :all-connections)}} :insets {:bottom? true :top? true}} :component manage-all-connections/views} - ;; BUG REPORT {:name :bug-report :options {:insets {:top? true}} diff --git a/src/status_im2/contexts/profile/profiles/components.cljs b/src/status_im2/contexts/profile/profiles/components.cljs new file mode 100644 index 00000000000..acd1e2781c1 --- /dev/null +++ b/src/status_im2/contexts/profile/profiles/components.cljs @@ -0,0 +1,70 @@ +(ns status-im2.contexts.profile.profiles.components + (:require [react-native.core :as rn] + [quo2.core :as quo] + [status-im2.contexts.profile.profiles.style :as styles] + [status-im2.contexts.chat.messages.avatar.view :as avatar] + [status-im.multiaccounts.core :as multiaccounts])) + +(def top-background-view + [rn/view + {:style styles/top-background-view}]) + +(defn button + [{:keys [icon accessibility-label on-press style]}] + [quo/button + {:icon-only? true + :type :grey + :background :blur + :size 32 + :container-style style + :accessibility-label accessibility-label + :on-press on-press} + icon]) + +(defn fixed-toolbar + [{:keys [on-close on-switch-profile on-show-qr on-share]}] + [rn/view + {:style styles/toolbar} + [button + {:icon :i/close + :accessibility-label :close-header-button + :on-press on-close + :style {:margin-left 20}}] + [rn/view + {:style styles/right-accessories} + [button + {:icon :i/multi-profile + :accessibility-label :multi-profile-header-button + :on-press on-switch-profile}] + [button + {:icon :i/qr-code + :accessibility-label :qr-header-button + :on-press on-show-qr + :style {:margin-horizontal 14}}] + [button + {:icon :i/share + :accessibility-label :share-header-button + :on-press on-share}]]]) + +(defn user-info + [{:keys [emoji-hash account public-key about]}] + [rn/view + [rn/view + {:style styles/avatar} + [avatar/avatar public-key :big]] + + [rn/view + {:style styles/user-info} + [quo/text + {:size :heading-1 + :weight :semi-bold + :style {:margin-top 16}} + (multiaccounts/displayed-name account)] + [quo/text + {:size :paragraph-1 + :style {:margin-top 8}} + about] + [quo/text + {:size :paragraph-1 + :style {:margin-top 8}} + emoji-hash]]]) diff --git a/src/status_im2/contexts/profile/profiles/list_items.cljs b/src/status_im2/contexts/profile/profiles/list_items.cljs new file mode 100644 index 00000000000..c20a321c741 --- /dev/null +++ b/src/status_im2/contexts/profile/profiles/list_items.cljs @@ -0,0 +1,190 @@ +(ns status-im2.contexts.profile.profiles.list-items + (:require [quo2.core :as quo2] + [quo.core :as quo] + [quo.design-system.colors :as colors] + [re-frame.core :as re-frame] + [status-im.ui.components.badge :as components.common] + [react-native.core :as rn] + [status-im2.contexts.profile.profiles.style :as styles] + [utils.i18n :as i18n] + [quo2.components.icon :as icons] + [quo2.foundations.colors :as fcolors])) + +(def separator + [quo2/separator]) + +(defn list-item + [{:keys [icon title accessibility-label chevron accessory on-press title-style]}] + [quo/list-item + {:icon icon + :icon-bg-color "transparent" + :icon-size 32 + :icon-color (:text-03 @colors/theme) + :title title + :title-color (:text-01 @colors/theme) + :title-style (merge {:padding-horizontal 0} title-style) + :accessibility-label accessibility-label + :chevron chevron + :size :small + :container-style styles/list-item-container + :accessory accessory + :on-press on-press}]) + +(def personal-info-group + [rn/view + {:style styles/rounded-view} + [list-item + {:icon :i/edit-profile + :title (i18n/label :t/edit-profile) + :accessibility-label :edit-profile-settings-button + :chevron true + ;; TODO: No edit profile action + ;; :on-press #(re-frame/dispatch [:navigate-to :edit]) + }] + separator + [list-item + {:icon :i/key-profile + :title (i18n/label :t/password) + :accessibility-label :password-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :reset-password])}]]) + +(defn activity-settings-group + [{:keys [mnemonic]}] + + [rn/view + {:style styles/rounded-view} + [list-item + {:icon :i/message-profile + :title (i18n/label :t/messages) + :accessibility-label :message-settings-button + :chevron true + :accessory (when mnemonic + [components.common/badge {:size 22} 1]) + ;; TODO: Chat home doesn't look great + ;; :on-press #(re-frame/dispatch [:navigate-to :chat]) + }] + separator + [list-item + {:icon :i/communities + :title (i18n/label :t/communities) + :accessibility-label :communities-settings-button + :chevron true + :accessory (when mnemonic + [components.common/badge {:size 22} 1]) + ;; TODO: Community home doesn't work correctly + ;; :on-press #(re-frame/dispatch [:navigate-to :community-home]) + }] + separator + [list-item + {:icon :i/wallet-profile + :title (i18n/label :t/wallet) + :accessibility-label :wallet-settings-button + :chevron true + ;; TODO: Wallet screen needs back button + :on-press #(re-frame/dispatch [:navigate-to :wallet])}] + separator + [list-item + {:icon :i/dapps + :title (i18n/label :t/dapps) + :accessibility-label :dapps-settings-button + :chevron true + :on-press #(re-frame/dispatch [:browser.ui/open-url "https://dap.ps"])}] + separator + [list-item + {:icon :i/browser + :title (i18n/label :t/browser) + :accessibility-label :browser-settings-button + :chevron true + ;; TODO: Needs back button? + :on-press #(re-frame/dispatch [:navigate-to :browser])}] + separator + [list-item + {:icon :i/keycard-profile + :title (i18n/label :t/keycard) + :accessibility-label :keycard-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :keycard-settings])}]]) + +(defn device-settings-group + [{:keys [local-pairing-mode-enabled?]}] + [rn/view + {:style styles/rounded-view} + (when local-pairing-mode-enabled? + [rn/view + [list-item + {:icon :i/syncing + :title (i18n/label :t/syncing) + :accessibility-label :syncing-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :settings-syncing])}] + separator]) + [list-item + {:icon :i/notification + :title (i18n/label :t/notifications) + :accessibility-label :notifications-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :notifications])}] + separator + [list-item + {:icon :i/appearance + :title (i18n/label :t/appearance) + :accessibility-label :appearance-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :appearance])}] + separator + [list-item + {:icon :i/globe + :title (i18n/label :t/language-and-currency) + :accessibility-label :language-settings-button + :chevron true + ;; TODO: No language screen + ;; :on-press #(re-frame/dispatch [:navigate-to :appearance]) + }]]) + +(def advanced-settings-group + [rn/view + {:style styles/rounded-view} + [list-item + {:icon :i/mobile-profile + :title (i18n/label :t/data-usage) + :accessibility-label :data-usage-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :mobile-network-settings])}] + separator + [list-item + {:icon :i/settings + :title (i18n/label :t/advanced) + :accessibility-label :advanced-settings-button + :chevron true + :on-press #(re-frame/dispatch [:navigate-to :advanced-settings])}]]) + +(def about-help-group + [rn/view + {:style styles/rounded-view} + [list-item + {:title (i18n/label :t/about-app) + :accessibility-label :about-button + :chevron true + :title-style {:margin-horizontal 16} + :on-press #(re-frame/dispatch [:navigate-to :about-app])}] + separator + [list-item + {:title (i18n/label :t/status-help) + :accessibility-label :help-button + :chevron false + :accessory [icons/icon :i/external {:color colors/gray}] + :title-style {:margin-horizontal 16} + :on-press #(re-frame/dispatch [:navigate-to :help-center])}]]) + +(def logout-item + [rn/view + {:style styles/logout-container + :on-press + #(re-frame/dispatch [:multiaccounts.logout.ui/logout-pressed]) + :accessibility-label :log-out-button} + [icons/icon :i/log-out {:color fcolors/danger-60}] + [quo2/text + {:style {:color fcolors/danger-60 + :margin-left 8}} + (i18n/label :t/logout)]]) diff --git a/src/status_im2/contexts/profile/profiles/style.cljs b/src/status_im2/contexts/profile/profiles/style.cljs index 008f0e20192..128aa03debd 100644 --- a/src/status_im2/contexts/profile/profiles/style.cljs +++ b/src/status_im2/contexts/profile/profiles/style.cljs @@ -1,6 +1,7 @@ (ns status-im2.contexts.profile.profiles.style (:require [quo2.foundations.colors :as colors] - [react-native.reanimated :as reanimated])) + [react-native.reanimated :as reanimated] + [react-native.safe-area :as safe-area])) ;; Profiles Section @@ -53,3 +54,88 @@ (def login-profile-card {:margin-bottom 20}) +(def error-message + {:margin-top 8 + :flex-direction :row + :align-items :center}) + +(def forget-password-doc-container {:margin-right 16}) +(def forget-password-step-container {:flex-direction :row :margin-top 14}) +(def forget-password-step-content {:margin-left 10}) +(def forget-password-step-title {:flex-direction :row}) + + +(def share-link-button + {:margin-top 12 + :margin-horizontal 16 + :margin-bottom 16}) + +(def radius 16) + +(def top-background-view + {:background-color (colors/custom-color :magenta 50 40) + :position :absolute + :top 0 + :left 0 + :height 400 + :right 0 + :z-index -1}) + +(def toolbar + {:padding-bottom 16 + :padding-top (safe-area/get-top) + :flex-direction :row + :align-items :center + :justify-content :space-between}) + +(def header-icon-style + {:border-radius 10 + :margin-left 16 + :width 32 + :height 32 + :background-color colors/white-opa-10}) + +(def right-accessories + {:flex-direction :row + :align-items :center + :justify-content :space-between + :margin-right 20}) + +(def avatar + {:margin-top 8 + :margin-horizontal 24 + :z-index 100}) + +(def user-info + {:background-color colors/neutral-95 + :padding-horizontal 16 + :border-top-left-radius 20 + :border-top-right-radius 20 + :margin-top -38 + :padding-top 38 + :padding-bottom 16}) + +(def container-style {:background-color colors/neutral-95}) + +(def rounded-view + {:margin-top 16 + :margin-horizontal 20 + :overflow "hidden" + :border-radius radius}) + +(def list-item-container + {:background-color "#242D3F" + :padding-left -12 + :padding-right 6}) + +(def logout-container + {:align-items :center + :justify-content :center + :flex-direction :row + :height 48 + :margin-horizontal 20 + :margin-top 16 + :margin-bottom 64 + :overflow "hidden" + :border-radius radius + :background-color (colors/custom-color :danger 50 20)}) diff --git a/src/status_im2/contexts/profile/profiles/views.cljs b/src/status_im2/contexts/profile/profiles/views.cljs new file mode 100644 index 00000000000..4fbdd68b01f --- /dev/null +++ b/src/status_im2/contexts/profile/profiles/views.cljs @@ -0,0 +1,72 @@ +(ns status-im2.contexts.profile.profiles.views + (:require [clojure.string :as string] + [re-frame.core :as re-frame] + [utils.debounce :refer [dispatch-and-chill]] + [status-im.ui.components.list-selection :as list-selection] + [react-native.core :as rn] + [status-im2.contexts.profile.profiles.components :as components] + [status-im2.contexts.profile.profiles.list-items :as profile-list-item] + [status-im2.contexts.profile.profiles.style :as styles] + [status-im.utils.universal-links.utils :as universal-links] + [status-im2.config :as config])) + +(defn items + [{:keys [mnemonic]}] + [rn/view + {:style styles/container-style} + + profile-list-item/personal-info-group + + [profile-list-item/activity-settings-group + {:mnemonic mnemonic}] + + [profile-list-item/device-settings-group + {:local-pairing-mode-enabled? config/local-pairing-mode-enabled?}] + + profile-list-item/advanced-settings-group + + profile-list-item/about-help-group + + profile-list-item/logout-item]) + +(defn my-profile + [] + (fn [] + (let [{:keys [public-key + compressed-key + ens-verified + emoji-hash + mnemonic + ens-name address + key-uid] + :as account} + @(re-frame/subscribe [:profile/multiaccount]) + customization-color (or (:color @(re-frame/subscribe [:onboarding-2/profile])) + @(re-frame/subscribe [:profile/customization-color key-uid])) + on-share #(dispatch-and-chill [:open-modal :share-shell] 1000) + has-picture @(re-frame/subscribe [:profile/has-picture]) + link (universal-links/generate-link :user :external (or ens-name address))] + + [rn/view {:flex 1 :style styles/container-style} + + components/top-background-view + + [components/fixed-toolbar + {:on-share #(list-selection/open-share {:message link}) + :on-close #(re-frame/dispatch [:navigate-back]) + ;; TODO: No action for switch account + :on-switch-profile nil + :on-show-qr on-share}] + + [rn/scroll-view + [components/user-info + {:on-share on-share + :has-picture has-picture + :customization-color customization-color + :account account + :emoji-hash (string/join emoji-hash) + :ens-verified ens-verified + :public-key public-key + :compressed-key compressed-key}] + [items + {:mnemonic mnemonic}]]]))) diff --git a/src/status_im2/navigation/screens.cljs b/src/status_im2/navigation/screens.cljs index 6ea8bd8941f..8b5fb43581d 100644 --- a/src/status_im2/navigation/screens.cljs +++ b/src/status_im2/navigation/screens.cljs @@ -27,6 +27,7 @@ [status-im2.contexts.onboarding.syncing.results.view :as syncing-results] [status-im2.contexts.onboarding.welcome.view :as welcome] [status-im2.contexts.profile.profiles.view :as profiles] + [status-im2.contexts.profile.profiles.views :as my-profile] [status-im2.contexts.quo-preview.main :as quo.preview] [status-im2.contexts.shell.activity-center.view :as activity-center] [status-im2.contexts.shell.jump-to.view :as shell] @@ -129,6 +130,12 @@ :on-focus [:onboarding/overlay-dismiss] :component profiles/view} + {:name :my-profile + :options {:theme :dark + :layout options/onboarding-layout} + :on-focus [:onboarding/overlay-dismiss] + :component my-profile/my-profile} + {:name :new-to-status :options {:theme :dark :layout options/onboarding-transparent-layout diff --git a/translations/en.json b/translations/en.json index ebddc56855c..467581c2bd1 100644 --- a/translations/en.json +++ b/translations/en.json @@ -852,6 +852,7 @@ "keycard-is-blocked-details": "You can no longer use this card to access or sign for this account. There have been too many failed passcode and PUK attempts.", "keycard-is-blocked-instructions": "To access your account you will need to factory reset your card. Tap the button below to start the procedure, you will need your mnemonic.", "language": "Language", + "language-and-currency": "Language and currency", "learn-more": "Learn more", "learn-more-about-keycard": "Learn more about Keycard", "leave": "Leave", @@ -1304,6 +1305,7 @@ "status": "Status", "status-confirmed": "Confirmed", "status-hardwallet": "Status hardwallet", + "status-help": "Status Help", "status-keycard": "Status Keycard", "status-pending": "Pending", "status-tx-not-found": "TX not found", @@ -1702,6 +1704,7 @@ "transfers-fetching-failure": "Transfers history could not be updated. Check your connection and pull down to try again", "move-and-reset": "Move and Reset", "move-keystore-file-to-keycard": "Move keystore file to keycard?", + "data-usage": "Data usage", "database-reset-title": "Database reset", "database-reset-content": "Chats, contacts and settings have been deleted. You can use your account with your Keycard", "database-reset-warning": "Database will be reset. Chats, contacts and settings will be deleted",