From bcf5ba6eecbf5a279c1f314825556a5774b16098 Mon Sep 17 00:00:00 2001 From: alwx Date: Tue, 7 May 2024 16:33:57 +0200 Subject: [PATCH 1/9] Connected dApps screen --- ios/Podfile.lock | 2 +- .../components/navigation/page_nav/view.cljs | 121 +++++----- .../wallet/common/account_switcher/view.cljs | 30 +-- .../wallet/connected_dapps/style.cljs | 17 ++ .../contexts/wallet/connected_dapps/view.cljs | 28 +++ src/status_im/navigation/screens.cljs | 207 +++++++++--------- 6 files changed, 226 insertions(+), 179 deletions(-) create mode 100644 src/status_im/contexts/wallet/connected_dapps/style.cljs create mode 100644 src/status_im/contexts/wallet/connected_dapps/view.cljs diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e8225686849..36b9a3a78c2 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1489,7 +1489,7 @@ SPEC CHECKSUMS: FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 530710e7949eb12c82670bd09e946becf50a3c2a + glog: 5ce14391bd2885c921f691b0abdff44138728fac hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8 diff --git a/src/quo/components/navigation/page_nav/view.cljs b/src/quo/components/navigation/page_nav/view.cljs index ae41e10347a..66ccff1a897 100644 --- a/src/quo/components/navigation/page_nav/view.cljs +++ b/src/quo/components/navigation/page_nav/view.cljs @@ -1,19 +1,19 @@ (ns quo.components.navigation.page-nav.view (:require - [quo.components.avatars.account-avatar.view :as account-avatar] - [quo.components.avatars.group-avatar.view :as group-avatar] - [quo.components.buttons.button.properties :as button-properties] - [quo.components.buttons.button.view :as button] - [quo.components.dropdowns.dropdown.properties :as dropdown-properties] - [quo.components.dropdowns.dropdown.view :as dropdown] - [quo.components.dropdowns.network-dropdown.view :as network-dropdown] - [quo.components.icon :as icons] - [quo.components.markdown.text :as text] - [quo.components.navigation.page-nav.style :as style] - [quo.theme] - [react-native.core :as rn] - [react-native.reanimated :as reanimated] - [utils.worklets.profile-header :as header-worklet])) + [quo.components.avatars.account-avatar.view :as account-avatar] + [quo.components.avatars.group-avatar.view :as group-avatar] + [quo.components.buttons.button.properties :as button-properties] + [quo.components.buttons.button.view :as button] + [quo.components.dropdowns.dropdown.properties :as dropdown-properties] + [quo.components.dropdowns.dropdown.view :as dropdown] + [quo.components.dropdowns.network-dropdown.view :as network-dropdown] + [quo.components.icon :as icons] + [quo.components.markdown.text :as text] + [quo.components.navigation.page-nav.style :as style] + [quo.theme] + [react-native.core :as rn] + [react-native.reanimated :as reanimated] + [utils.worklets.profile-header :as header-worklet])) (def ^:private button-type {:white :grey @@ -44,48 +44,53 @@ (defn- right-section-spacing [] [rn/view {:style style/right-actions-spacing}]) +(defmulti add-button + (fn [{:keys [button-props]}] + (:content-type button-props))) + +(defmethod add-button :account-switcher [{:keys [support-account-switcher? button-props]}] + (when support-account-switcher? + (let [{:keys [customization-color on-press emoji type]} button-props] + [rn/pressable {:on-press on-press} + [account-avatar/view + {:emoji emoji + :size 32 + :type (or type :default) + :customization-color customization-color}]]))) + +(defmethod add-button :default [{:keys [background behind-overlay? button-props]}] + (let [{:keys [label icon-name]} button-props] + [button/button + (assoc button-props + :type (button-type background) + :icon-only? icon-name + :size 32 + :accessible true + :background (if behind-overlay? + :blur + (when (button-properties/backgrounds background) background))) + (or label icon-name)])) + (defn- add-right-buttons-xf - [max-actions background behind-overlay?] + [max-actions background behind-overlay? support-account-switcher?] (comp (filter map?) (take max-actions) - (map (fn [{:keys [icon-name label] :as button-props}] - [button/button - (assoc button-props - :type (button-type background) - :icon-only? icon-name - :size 32 - :accessible true - :background (if behind-overlay? - :blur - (when (button-properties/backgrounds background) background))) - (or label icon-name)])) + (map (fn [button-props] + (add-button {:background background + :behind-overlay? behind-overlay? + :support-account-switcher? support-account-switcher? + :button-props button-props}))) (interpose [right-section-spacing]))) -(defn- account-switcher-content - [{:keys [customization-color on-press emoji type]}] - [rn/pressable {:on-press on-press} - [account-avatar/view - {:emoji emoji - :size 32 - :type (or type :default) - :customization-color customization-color}]]) - (defn- right-content - [{:keys [background content max-actions min-size? support-account-switcher? account-switcher + [{:keys [background content max-actions min-size? support-account-switcher? behind-overlay?] :or {support-account-switcher? true}}] [rn/view (when min-size? {:style style/right-content-min-size}) - (cond - (and support-account-switcher? (= content :account-switcher)) - [account-switcher-content account-switcher] - - (coll? content) + (when (coll? content) (into [rn/view {:style style/right-actions-container}] - (add-right-buttons-xf max-actions background behind-overlay?) - content) - - :else - nil)]) + (add-right-buttons-xf max-actions background behind-overlay? support-account-switcher?) + content))]) (def header-height 155) (def page-nav-height 25) @@ -208,19 +213,11 @@ - on-press: callback for left button - icon-name: icon for left button - right-side (optional): - - The `:account-switcher` keyword - vector of maps to render buttons, e.g.: {:icon-name :i/my-icon :on-press (fn callback [] nil) :accessibility-label \"an optional label\"} - - account-switcher (optional) - - props to render dropdown component (emoji only) e.g.: - {:customization-color :purple - :on-press (fn [] nil) - :state :default (inherit dropdown states) - :emoji \"🍑\"} - Depending on the `type` selected, different properties are accepted: `:title` - title @@ -251,7 +248,7 @@ `:network` - network-name - network-logo a valid rn/image `:source` value" - [{:keys [type right-side background text-align account-switcher behind-overlay?] + [{:keys [type right-side background text-align behind-overlay?] :or {type :no-title text-align :center right-side :none @@ -264,8 +261,7 @@ {:background background :content right-side :max-actions 3 - :behind-overlay? behind-overlay? - :account-switcher account-switcher}]] + :behind-overlay? behind-overlay?}]] :title (let [centered? (= text-align :center)] @@ -275,8 +271,7 @@ {:background background :content right-side :max-actions (if centered? 1 3) - :min-size? centered? - :account-switcher account-switcher}]]) + :min-size? centered?}]]) :dropdown [page-nav-base props @@ -293,8 +288,7 @@ [right-content {:background background :content right-side - :max-actions 3 - :account-switcher account-switcher}]] + :max-actions 3}]] :channel [page-nav-base props @@ -320,9 +314,8 @@ [right-content {:background background :content right-side - :max-actions 1 - :min-size? true - :account-switcher account-switcher}]] + :max-actions 2 + :min-size? true}]] (:community :network) [page-nav-base props diff --git a/src/status_im/contexts/wallet/common/account_switcher/view.cljs b/src/status_im/contexts/wallet/common/account_switcher/view.cljs index e7c45022cc5..7b704874f20 100644 --- a/src/status_im/contexts/wallet/common/account_switcher/view.cljs +++ b/src/status_im/contexts/wallet/common/account_switcher/view.cljs @@ -1,10 +1,10 @@ (ns status-im.contexts.wallet.common.account-switcher.view (:require - [quo.core :as quo] - [status-im.contexts.wallet.sheets.account-options.view :as account-options] - [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] - [status-im.contexts.wallet.sheets.select-account.view :as select-account] - [utils.re-frame :as rf])) + [quo.core :as quo] + [status-im.contexts.wallet.sheets.account-options.view :as account-options] + [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] + [status-im.contexts.wallet.sheets.select-account.view :as select-account] + [utils.re-frame :as rf])) (defn get-bottom-sheet-args [switcher-type] @@ -18,11 +18,12 @@ [{:keys [type on-press accessibility-label icon-name switcher-type margin-top] :or {icon-name :i/close accessibility-label :top-bar - switcher-type :account-options}}] + switcher-type :account-options + type :no-title}}] (let [{:keys [color emoji watch-only?]} (rf/sub [:wallet/current-viewing-account]) networks (rf/sub [:wallet/selected-network-details])] [quo/page-nav - {:type (or type :no-title) + {:type type :icon-name icon-name :margin-top margin-top :background :blur @@ -30,9 +31,12 @@ :accessibility-label accessibility-label :networks networks :networks-on-press #(rf/dispatch [:show-bottom-sheet {:content network-filter/view}]) - :right-side :account-switcher - :account-switcher {:customization-color color - :on-press #(rf/dispatch [:show-bottom-sheet - (get-bottom-sheet-args switcher-type)]) - :emoji emoji - :type (when watch-only? :watch-only)}}])) + :right-side [{:icon-name :i/dapps + :on-press #(rf/dispatch [:navigate-to :screen/wallet.connected-dapps])} + + {:content-type :account-switcher + :customization-color color + :on-press #(rf/dispatch [:show-bottom-sheet + (get-bottom-sheet-args switcher-type)]) + :emoji emoji + :type (when watch-only? :watch-only)}]}])) diff --git a/src/status_im/contexts/wallet/connected_dapps/style.cljs b/src/status_im/contexts/wallet/connected_dapps/style.cljs new file mode 100644 index 00000000000..068690f329a --- /dev/null +++ b/src/status_im/contexts/wallet/connected_dapps/style.cljs @@ -0,0 +1,17 @@ +(ns status-im.contexts.wallet.connected-dapps.style + (:require [quo.foundations.colors :as colors])) + +(def screen-padding 20) + +(def header-container + {:flex-direction :row + :justify-content :space-between + :padding-horizontal screen-padding + :margin-vertical 12}) + +(defn header-text + [bottom-padding?] + {:padding-horizontal screen-padding + :padding-top 12 + :padding-bottom (when bottom-padding? 8) + :color colors/black}) diff --git a/src/status_im/contexts/wallet/connected_dapps/view.cljs b/src/status_im/contexts/wallet/connected_dapps/view.cljs new file mode 100644 index 00000000000..bf21b8360cd --- /dev/null +++ b/src/status_im/contexts/wallet/connected_dapps/view.cljs @@ -0,0 +1,28 @@ +(ns status-im.contexts.wallet.connected-dapps.view + (:require + [quo.core :as quo] + [react-native.core :as rn] + [status-im.contexts.wallet.connected-dapps.style :as style] + [utils.re-frame :as rf])) + +(defn- header + [{:keys [title subtitle]}] + [:<> + [rn/view {:style style/header-container} + [quo/button + {:icon-only? true + :type :grey + :background :blur + :size 32 + :accessibility-label :close-scan-qr-code + :on-press #(rf/dispatch [:navigate-back])} + :i/close]] + [quo/text + {:size :heading-1 + :weight :semi-bold + :style (style/header-text (when subtitle true))} + title]]) + +(defn view [] + [rn/view {:style {:flex 1}} + [header {:title "Connected dApps"}]]) \ No newline at end of file diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 714d53155ec..6c371558b6a 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -1,106 +1,107 @@ (ns status-im.navigation.screens (:require - [legacy.status-im.ui.screens.screens :as old-screens] - [quo.foundations.colors :as colors] - [status-im.common.emoji-picker.view :as emoji-picker] - [status-im.common.enter-seed-phrase.view :as enter-seed-phrase] - [status-im.common.lightbox.view :as lightbox] - [status-im.config :as config] - [status-im.contexts.chat.group-create.view :as group-create] - [status-im.contexts.chat.group-details.view :as group-details] - [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] - [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] - [status-im.contexts.chat.home.new-chat.view :as new-chat] - [status-im.contexts.chat.messenger.camera.view :as camera-screen] - [status-im.contexts.chat.messenger.messages.view :as chat] - [status-im.contexts.chat.messenger.photo-selector.view :as photo-selector] - [status-im.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection] - [status-im.contexts.communities.actions.addresses-for-permissions.view :as - addresses-for-permissions] - [status-im.contexts.communities.actions.airdrop-addresses.view :as airdrop-addresses] - [status-im.contexts.communities.actions.channel-view-details.view :as - channel-view-channel-members-and-details] - [status-im.contexts.communities.actions.invite-contacts.view :as communities.invite] - [status-im.contexts.communities.actions.request-to-join.view :as join-menu] - [status-im.contexts.communities.actions.share-community-channel.view :as share-community-channel] - [status-im.contexts.communities.actions.share-community.view :as share-community] - [status-im.contexts.communities.discover.view :as communities.discover] - [status-im.contexts.communities.overview.view :as communities.overview] - [status-im.contexts.onboarding.create-password.view :as create-password] - [status-im.contexts.onboarding.create-profile.view :as create-profile] - [status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics] - [status-im.contexts.onboarding.enable-notifications.view :as enable-notifications] - [status-im.contexts.onboarding.generating-keys.view :as generating-keys] - [status-im.contexts.onboarding.identifiers.view :as identifiers] - [status-im.contexts.onboarding.intro.view :as intro] - [status-im.contexts.onboarding.new-to-status.view :as new-to-status] - [status-im.contexts.onboarding.sign-in.view :as sign-in] - [status-im.contexts.onboarding.syncing.progress.view :as syncing-devices] - [status-im.contexts.onboarding.syncing.results.view :as syncing-results] - [status-im.contexts.onboarding.welcome.view :as welcome] - [status-im.contexts.preview.feature-flags.view :as feature-flags] - [status-im.contexts.preview.quo.component-preview.view :as component-preview] - [status-im.contexts.preview.quo.main :as quo.preview] - [status-im.contexts.preview.status-im.main :as status-im-preview] - [status-im.contexts.profile.contact.share.view :as share-contact] - [status-im.contexts.profile.contact.view :as contact-profile] - [status-im.contexts.profile.edit.accent-colour.view :as edit-accent-colour] - [status-im.contexts.profile.edit.bio.view :as edit-bio] - [status-im.contexts.profile.edit.name.view :as edit-name] - [status-im.contexts.profile.edit.view :as edit-profile] - [status-im.contexts.profile.profiles.view :as profiles] - [status-im.contexts.profile.settings.screens.messages.blocked-users.view :as - settings.blocked-users] - [status-im.contexts.profile.settings.screens.messages.view :as settings.messages] - [status-im.contexts.profile.settings.screens.password.change-password.loading :as - change-password-loading] - [status-im.contexts.profile.settings.screens.password.change-password.view :as change-password] - [status-im.contexts.profile.settings.screens.password.view :as settings-password] - [status-im.contexts.profile.settings.view :as settings] - [status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings] - [status-im.contexts.settings.wallet.wallet-options.view :as wallet-options] - [status-im.contexts.shell.activity-center.view :as activity-center] - [status-im.contexts.shell.jump-to.view :as shell] - [status-im.contexts.shell.qr-reader.view :as shell-qr-reader] - [status-im.contexts.shell.share.view :as share] - [status-im.contexts.syncing.find-sync-code.view :as find-sync-code] - [status-im.contexts.syncing.how-to-pair.view :as how-to-pair] - [status-im.contexts.syncing.scan-sync-code-page.view :as scan-sync-code-page] - [status-im.contexts.syncing.setup-syncing.view :as settings-setup-syncing] - [status-im.contexts.syncing.syncing-devices-list.view :as settings-syncing] - [status-im.contexts.wallet.account.edit-account.view :as wallet-edit-account] - [status-im.contexts.wallet.account.share-address.view :as wallet-share-address] - [status-im.contexts.wallet.account.view :as wallet-accounts] - [status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as - wallet-confirm-address-to-watch] - [status-im.contexts.wallet.add-account.add-address-to-watch.view :as wallet-add-address-to-watch] - [status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as - wallet-edit-derivation-path] - [status-im.contexts.wallet.add-account.create-account.import-private-key.view :as - wallet-import-private-key] - [status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view :as - wallet-backup-recovery-phrase] - [status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view :as - wallet-check-your-backup] - [status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view :as - wallet-keypair-name] - [status-im.contexts.wallet.add-account.create-account.select-keypair.view :as wallet-select-keypair] - [status-im.contexts.wallet.add-account.create-account.view :as wallet-create-account] - [status-im.contexts.wallet.bridge.bridge-to.view :as wallet-bridge-to] - [status-im.contexts.wallet.bridge.input-amount.view :as wallet-bridge-input-amount] - [status-im.contexts.wallet.bridge.select-asset.view :as wallet-bridge-select-asset] - [status-im.contexts.wallet.collectible.view :as wallet-collectible] - [status-im.contexts.wallet.common.scan-account.view :as wallet-scan-address] - [status-im.contexts.wallet.save-address.view :as wallet-save-address] - [status-im.contexts.wallet.send.from.view :as wallet-select-from] - [status-im.contexts.wallet.send.select-address.view :as wallet-select-address] - [status-im.contexts.wallet.send.select-asset.view :as wallet-select-asset] - [status-im.contexts.wallet.send.select-collectible-amount.view :as wallet-select-collectible-amount] - [status-im.contexts.wallet.send.send-amount.view :as wallet-send-input-amount] - [status-im.contexts.wallet.send.transaction-confirmation.view :as wallet-transaction-confirmation] - [status-im.contexts.wallet.send.transaction-progress.view :as wallet-transaction-progress] - [status-im.navigation.options :as options] - [status-im.navigation.transitions :as transitions])) + [legacy.status-im.ui.screens.screens :as old-screens] + [quo.foundations.colors :as colors] + [status-im.common.emoji-picker.view :as emoji-picker] + [status-im.common.enter-seed-phrase.view :as enter-seed-phrase] + [status-im.common.lightbox.view :as lightbox] + [status-im.config :as config] + [status-im.contexts.chat.group-create.view :as group-create] + [status-im.contexts.chat.group-details.view :as group-details] + [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] + [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] + [status-im.contexts.chat.home.new-chat.view :as new-chat] + [status-im.contexts.chat.messenger.camera.view :as camera-screen] + [status-im.contexts.chat.messenger.messages.view :as chat] + [status-im.contexts.chat.messenger.photo-selector.view :as photo-selector] + [status-im.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection] + [status-im.contexts.communities.actions.addresses-for-permissions.view :as + addresses-for-permissions] + [status-im.contexts.communities.actions.airdrop-addresses.view :as airdrop-addresses] + [status-im.contexts.communities.actions.channel-view-details.view :as + channel-view-channel-members-and-details] + [status-im.contexts.communities.actions.invite-contacts.view :as communities.invite] + [status-im.contexts.communities.actions.request-to-join.view :as join-menu] + [status-im.contexts.communities.actions.share-community-channel.view :as share-community-channel] + [status-im.contexts.communities.actions.share-community.view :as share-community] + [status-im.contexts.communities.discover.view :as communities.discover] + [status-im.contexts.communities.overview.view :as communities.overview] + [status-im.contexts.onboarding.create-password.view :as create-password] + [status-im.contexts.onboarding.create-profile.view :as create-profile] + [status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics] + [status-im.contexts.onboarding.enable-notifications.view :as enable-notifications] + [status-im.contexts.onboarding.generating-keys.view :as generating-keys] + [status-im.contexts.onboarding.identifiers.view :as identifiers] + [status-im.contexts.onboarding.intro.view :as intro] + [status-im.contexts.onboarding.new-to-status.view :as new-to-status] + [status-im.contexts.onboarding.sign-in.view :as sign-in] + [status-im.contexts.onboarding.syncing.progress.view :as syncing-devices] + [status-im.contexts.onboarding.syncing.results.view :as syncing-results] + [status-im.contexts.onboarding.welcome.view :as welcome] + [status-im.contexts.preview.feature-flags.view :as feature-flags] + [status-im.contexts.preview.quo.component-preview.view :as component-preview] + [status-im.contexts.preview.quo.main :as quo.preview] + [status-im.contexts.preview.status-im.main :as status-im-preview] + [status-im.contexts.profile.contact.share.view :as share-contact] + [status-im.contexts.profile.contact.view :as contact-profile] + [status-im.contexts.profile.edit.accent-colour.view :as edit-accent-colour] + [status-im.contexts.profile.edit.bio.view :as edit-bio] + [status-im.contexts.profile.edit.name.view :as edit-name] + [status-im.contexts.profile.edit.view :as edit-profile] + [status-im.contexts.profile.profiles.view :as profiles] + [status-im.contexts.profile.settings.screens.messages.blocked-users.view :as + settings.blocked-users] + [status-im.contexts.profile.settings.screens.messages.view :as settings.messages] + [status-im.contexts.profile.settings.screens.password.change-password.loading :as + change-password-loading] + [status-im.contexts.profile.settings.screens.password.change-password.view :as change-password] + [status-im.contexts.profile.settings.screens.password.view :as settings-password] + [status-im.contexts.profile.settings.view :as settings] + [status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings] + [status-im.contexts.settings.wallet.wallet-options.view :as wallet-options] + [status-im.contexts.shell.activity-center.view :as activity-center] + [status-im.contexts.shell.jump-to.view :as shell] + [status-im.contexts.shell.qr-reader.view :as shell-qr-reader] + [status-im.contexts.shell.share.view :as share] + [status-im.contexts.syncing.find-sync-code.view :as find-sync-code] + [status-im.contexts.syncing.how-to-pair.view :as how-to-pair] + [status-im.contexts.syncing.scan-sync-code-page.view :as scan-sync-code-page] + [status-im.contexts.syncing.setup-syncing.view :as settings-setup-syncing] + [status-im.contexts.syncing.syncing-devices-list.view :as settings-syncing] + [status-im.contexts.wallet.account.edit-account.view :as wallet-edit-account] + [status-im.contexts.wallet.account.share-address.view :as wallet-share-address] + [status-im.contexts.wallet.account.view :as wallet-accounts] + [status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as + wallet-confirm-address-to-watch] + [status-im.contexts.wallet.add-account.add-address-to-watch.view :as wallet-add-address-to-watch] + [status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as + wallet-edit-derivation-path] + [status-im.contexts.wallet.add-account.create-account.import-private-key.view :as + wallet-import-private-key] + [status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view :as + wallet-backup-recovery-phrase] + [status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view :as + wallet-check-your-backup] + [status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view :as + wallet-keypair-name] + [status-im.contexts.wallet.add-account.create-account.select-keypair.view :as wallet-select-keypair] + [status-im.contexts.wallet.add-account.create-account.view :as wallet-create-account] + [status-im.contexts.wallet.bridge.bridge-to.view :as wallet-bridge-to] + [status-im.contexts.wallet.bridge.input-amount.view :as wallet-bridge-input-amount] + [status-im.contexts.wallet.bridge.select-asset.view :as wallet-bridge-select-asset] + [status-im.contexts.wallet.collectible.view :as wallet-collectible] + [status-im.contexts.wallet.common.scan-account.view :as wallet-scan-address] + [status-im.contexts.wallet.connected-dapps.view :as wallet-connected-dapps] + [status-im.contexts.wallet.save-address.view :as wallet-save-address] + [status-im.contexts.wallet.send.from.view :as wallet-select-from] + [status-im.contexts.wallet.send.select-address.view :as wallet-select-address] + [status-im.contexts.wallet.send.select-asset.view :as wallet-select-asset] + [status-im.contexts.wallet.send.select-collectible-amount.view :as wallet-select-collectible-amount] + [status-im.contexts.wallet.send.send-amount.view :as wallet-send-input-amount] + [status-im.contexts.wallet.send.transaction-confirmation.view :as wallet-transaction-confirmation] + [status-im.contexts.wallet.send.transaction-progress.view :as wallet-transaction-progress] + [status-im.navigation.options :as options] + [status-im.navigation.transitions :as transitions])) (defn screens [] @@ -376,6 +377,10 @@ :options {:insets {:top? true}} :component wallet-accounts/view} + {:name :screen/wallet.connected-dapps + :options {:insets {:top? true}} + :component wallet-connected-dapps/view} + {:name :screen/wallet.edit-account :component wallet-edit-account/view} From d820fbfea8222883013184e468b049fc382285cc Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 09:17:02 +0200 Subject: [PATCH 2/9] Style fixes --- .../components/navigation/page_nav/view.cljs | 70 ++++++++++--------- .../wallet/common/account_switcher/view.cljs | 10 +-- .../contexts/wallet/connected_dapps/view.cljs | 11 +-- 3 files changed, 47 insertions(+), 44 deletions(-) diff --git a/src/quo/components/navigation/page_nav/view.cljs b/src/quo/components/navigation/page_nav/view.cljs index 66ccff1a897..4009340b860 100644 --- a/src/quo/components/navigation/page_nav/view.cljs +++ b/src/quo/components/navigation/page_nav/view.cljs @@ -1,19 +1,19 @@ (ns quo.components.navigation.page-nav.view (:require - [quo.components.avatars.account-avatar.view :as account-avatar] - [quo.components.avatars.group-avatar.view :as group-avatar] - [quo.components.buttons.button.properties :as button-properties] - [quo.components.buttons.button.view :as button] - [quo.components.dropdowns.dropdown.properties :as dropdown-properties] - [quo.components.dropdowns.dropdown.view :as dropdown] - [quo.components.dropdowns.network-dropdown.view :as network-dropdown] - [quo.components.icon :as icons] - [quo.components.markdown.text :as text] - [quo.components.navigation.page-nav.style :as style] - [quo.theme] - [react-native.core :as rn] - [react-native.reanimated :as reanimated] - [utils.worklets.profile-header :as header-worklet])) + [quo.components.avatars.account-avatar.view :as account-avatar] + [quo.components.avatars.group-avatar.view :as group-avatar] + [quo.components.buttons.button.properties :as button-properties] + [quo.components.buttons.button.view :as button] + [quo.components.dropdowns.dropdown.properties :as dropdown-properties] + [quo.components.dropdowns.dropdown.view :as dropdown] + [quo.components.dropdowns.network-dropdown.view :as network-dropdown] + [quo.components.icon :as icons] + [quo.components.markdown.text :as text] + [quo.components.navigation.page-nav.style :as style] + [quo.theme] + [react-native.core :as rn] + [react-native.reanimated :as reanimated] + [utils.worklets.profile-header :as header-worklet])) (def ^:private button-type {:white :grey @@ -48,7 +48,8 @@ (fn [{:keys [button-props]}] (:content-type button-props))) -(defmethod add-button :account-switcher [{:keys [support-account-switcher? button-props]}] +(defmethod add-button :account-switcher + [{:keys [support-account-switcher? button-props]}] (when support-account-switcher? (let [{:keys [customization-color on-press emoji type]} button-props] [rn/pressable {:on-press on-press} @@ -58,7 +59,8 @@ :type (or type :default) :customization-color customization-color}]]))) -(defmethod add-button :default [{:keys [background behind-overlay? button-props]}] +(defmethod add-button :default + [{:keys [background behind-overlay? button-props]}] (let [{:keys [label icon-name]} button-props] [button/button (assoc button-props @@ -76,10 +78,10 @@ (comp (filter map?) (take max-actions) (map (fn [button-props] - (add-button {:background background - :behind-overlay? behind-overlay? + (add-button {:background background + :behind-overlay? behind-overlay? :support-account-switcher? support-account-switcher? - :button-props button-props}))) + :button-props button-props}))) (interpose [right-section-spacing]))) (defn- right-content @@ -258,20 +260,20 @@ :no-title [page-nav-base props [right-content - {:background background - :content right-side - :max-actions 3 - :behind-overlay? behind-overlay?}]] + {:background background + :content right-side + :max-actions 3 + :behind-overlay? behind-overlay?}]] :title (let [centered? (= text-align :center)] [page-nav-base props [title-center (assoc props :centered? centered?)] [right-content - {:background background - :content right-side - :max-actions (if centered? 1 3) - :min-size? centered?}]]) + {:background background + :content right-side + :max-actions (if centered? 1 3) + :min-size? centered?}]]) :dropdown [page-nav-base props @@ -286,9 +288,9 @@ [page-nav-base props [token-center props] [right-content - {:background background - :content right-side - :max-actions 3}]] + {:background background + :content right-side + :max-actions 3}]] :channel [page-nav-base props @@ -312,10 +314,10 @@ [page-nav-base props [wallet-networks-center props] [right-content - {:background background - :content right-side - :max-actions 2 - :min-size? true}]] + {:background background + :content right-side + :max-actions 2 + :min-size? true}]] (:community :network) [page-nav-base props diff --git a/src/status_im/contexts/wallet/common/account_switcher/view.cljs b/src/status_im/contexts/wallet/common/account_switcher/view.cljs index 7b704874f20..b8838e8568e 100644 --- a/src/status_im/contexts/wallet/common/account_switcher/view.cljs +++ b/src/status_im/contexts/wallet/common/account_switcher/view.cljs @@ -1,10 +1,10 @@ (ns status-im.contexts.wallet.common.account-switcher.view (:require - [quo.core :as quo] - [status-im.contexts.wallet.sheets.account-options.view :as account-options] - [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] - [status-im.contexts.wallet.sheets.select-account.view :as select-account] - [utils.re-frame :as rf])) + [quo.core :as quo] + [status-im.contexts.wallet.sheets.account-options.view :as account-options] + [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] + [status-im.contexts.wallet.sheets.select-account.view :as select-account] + [utils.re-frame :as rf])) (defn get-bottom-sheet-args [switcher-type] diff --git a/src/status_im/contexts/wallet/connected_dapps/view.cljs b/src/status_im/contexts/wallet/connected_dapps/view.cljs index bf21b8360cd..35c8743413a 100644 --- a/src/status_im/contexts/wallet/connected_dapps/view.cljs +++ b/src/status_im/contexts/wallet/connected_dapps/view.cljs @@ -1,9 +1,9 @@ (ns status-im.contexts.wallet.connected-dapps.view (:require - [quo.core :as quo] - [react-native.core :as rn] - [status-im.contexts.wallet.connected-dapps.style :as style] - [utils.re-frame :as rf])) + [quo.core :as quo] + [react-native.core :as rn] + [status-im.contexts.wallet.connected-dapps.style :as style] + [utils.re-frame :as rf])) (defn- header [{:keys [title subtitle]}] @@ -23,6 +23,7 @@ :style (style/header-text (when subtitle true))} title]]) -(defn view [] +(defn view + [] [rn/view {:style {:flex 1}} [header {:title "Connected dApps"}]]) \ No newline at end of file From 7403370972ff4e6f975c196d929d25c01b68807d Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 09:17:24 +0200 Subject: [PATCH 3/9] Style fixes --- src/status_im/contexts/wallet/connected_dapps/view.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status_im/contexts/wallet/connected_dapps/view.cljs b/src/status_im/contexts/wallet/connected_dapps/view.cljs index 35c8743413a..1fa004a3432 100644 --- a/src/status_im/contexts/wallet/connected_dapps/view.cljs +++ b/src/status_im/contexts/wallet/connected_dapps/view.cljs @@ -26,4 +26,4 @@ (defn view [] [rn/view {:style {:flex 1}} - [header {:title "Connected dApps"}]]) \ No newline at end of file + [header {:title "Connected dApps"}]]) From 58db7cb4ee43bba325e374ca035e0327b7117167 Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 11:25:27 +0200 Subject: [PATCH 4/9] Updated quo-preview --- .../components/navigation/page_nav/view.cljs | 2 +- .../preview/quo/navigation/page_nav.cljs | 26 +++++++++++-------- .../wallet/common/account_switcher/view.cljs | 6 +++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/quo/components/navigation/page_nav/view.cljs b/src/quo/components/navigation/page_nav/view.cljs index 4009340b860..76522d6f852 100644 --- a/src/quo/components/navigation/page_nav/view.cljs +++ b/src/quo/components/navigation/page_nav/view.cljs @@ -316,7 +316,7 @@ [right-content {:background background :content right-side - :max-actions 2 + :max-actions 3 :min-size? true}]] (:community :network) diff --git a/src/status_im/contexts/preview/quo/navigation/page_nav.cljs b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs index 805bed1604e..3d3720a18b7 100644 --- a/src/status_im/contexts/preview/quo/navigation/page_nav.cljs +++ b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs @@ -41,6 +41,12 @@ :value "Arrow left"}]}]) +(def account-switcher-option + {:content-type :account-switcher + :customization-color :purple + :on-press #(js/alert "Pressed Account Switcher") + :emoji "🍑"}) + (def right-side-options (let [options [{:icon-name :i/save :on-press #(js/alert "SAVE")} {:icon-name :i/mark-as-read :on-press #(js/alert "MARK AS READ")} @@ -52,20 +58,21 @@ {:key (take 2 options) :value "2 actions"} {:key (take 3 options) - :value "3 actions"}])) - -(def account-switcher - {:key :account-switcher}) + :value "3 actions"} + {:key (conj account-switcher-option (take 1 options)) + :value "1 action + account switcher"} + {:key (conj account-switcher-option (take 2 options)) + :value "2 actions + account switcher"}])) (def no-title-descriptor [{:key :right-side :type :select - :options (conj right-side-options account-switcher)}]) + :options right-side-options}]) (def title-descriptor [{:key :right-side :type :select - :options (conj right-side-options account-switcher)} + :options right-side-options} {:key :title :type :text} {:key :text-align :type :select @@ -79,7 +86,7 @@ (def token-descriptor [{:key :right-side :type :select - :options (conj right-side-options account-switcher)} + :options right-side-options} {:key :token-logo :type :select :options [{:key (resources/get-mock-image :status-logo) @@ -128,7 +135,7 @@ (def wallet-networks-descriptor [{:key :right-side :type :select - :options (conj (take 2 right-side-options) account-switcher)}]) + :options right-side-options}]) (def community-descriptor [{:key :right-side @@ -195,9 +202,6 @@ :community-logo (resources/get-mock-image :coinbase) :network-name "Mainnet" :network-logo (resources/get-mock-image :diamond) - :account-switcher {:customization-color :purple - :on-press #(js/alert "Pressed Account Switcher") - :emoji "🍑"} :networks networks})] (fn [] [preview/preview-container diff --git a/src/status_im/contexts/wallet/common/account_switcher/view.cljs b/src/status_im/contexts/wallet/common/account_switcher/view.cljs index b8838e8568e..e664a16633d 100644 --- a/src/status_im/contexts/wallet/common/account_switcher/view.cljs +++ b/src/status_im/contexts/wallet/common/account_switcher/view.cljs @@ -4,6 +4,7 @@ [status-im.contexts.wallet.sheets.account-options.view :as account-options] [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] [status-im.contexts.wallet.sheets.select-account.view :as select-account] + [status-im.feature-flags :as ff] [utils.re-frame :as rf])) (defn get-bottom-sheet-args @@ -31,8 +32,9 @@ :accessibility-label accessibility-label :networks networks :networks-on-press #(rf/dispatch [:show-bottom-sheet {:content network-filter/view}]) - :right-side [{:icon-name :i/dapps - :on-press #(rf/dispatch [:navigate-to :screen/wallet.connected-dapps])} + :right-side [(when (ff/enabled? ::ff/wallet.wallet-connect) + {:icon-name :i/dapps + :on-press #(rf/dispatch [:navigate-to :screen/wallet.connected-dapps])}) {:content-type :account-switcher :customization-color color From bbc815b6f98c663b0bf15d10b4b887c97333b240 Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 11:26:27 +0200 Subject: [PATCH 5/9] Reverting back Podfile.lock changes --- ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 36b9a3a78c2..e8225686849 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1489,7 +1489,7 @@ SPEC CHECKSUMS: FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 5ce14391bd2885c921f691b0abdff44138728fac + glog: 530710e7949eb12c82670bd09e946becf50a3c2a hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352 Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8 From d87c4ae1851dd1b0b047f78d30b1a88573e13d41 Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 13:18:47 +0200 Subject: [PATCH 6/9] Fixes --- .../wallet/common/account_switcher/view.cljs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/status_im/contexts/wallet/common/account_switcher/view.cljs b/src/status_im/contexts/wallet/common/account_switcher/view.cljs index e664a16633d..26a451d1e92 100644 --- a/src/status_im/contexts/wallet/common/account_switcher/view.cljs +++ b/src/status_im/contexts/wallet/common/account_switcher/view.cljs @@ -1,11 +1,11 @@ (ns status-im.contexts.wallet.common.account-switcher.view (:require - [quo.core :as quo] - [status-im.contexts.wallet.sheets.account-options.view :as account-options] - [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] - [status-im.contexts.wallet.sheets.select-account.view :as select-account] - [status-im.feature-flags :as ff] - [utils.re-frame :as rf])) + [quo.core :as quo] + [status-im.contexts.wallet.sheets.account-options.view :as account-options] + [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] + [status-im.contexts.wallet.sheets.select-account.view :as select-account] + [status-im.feature-flags :as ff] + [utils.re-frame :as rf])) (defn get-bottom-sheet-args [switcher-type] @@ -32,7 +32,8 @@ :accessibility-label accessibility-label :networks networks :networks-on-press #(rf/dispatch [:show-bottom-sheet {:content network-filter/view}]) - :right-side [(when (ff/enabled? ::ff/wallet.wallet-connect) + :right-side [(when (and (ff/enabled? ::ff/wallet.wallet-connect) + (not watch-only?)) {:icon-name :i/dapps :on-press #(rf/dispatch [:navigate-to :screen/wallet.connected-dapps])}) From 052a60a080e1fed88e8bc21c40804e2e19e929fc Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 13:23:00 +0200 Subject: [PATCH 7/9] Style fixes --- .../wallet/common/account_switcher/view.cljs | 12 +- src/status_im/navigation/screens.cljs | 204 +++++++++--------- 2 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/status_im/contexts/wallet/common/account_switcher/view.cljs b/src/status_im/contexts/wallet/common/account_switcher/view.cljs index 26a451d1e92..314fdcd2105 100644 --- a/src/status_im/contexts/wallet/common/account_switcher/view.cljs +++ b/src/status_im/contexts/wallet/common/account_switcher/view.cljs @@ -1,11 +1,11 @@ (ns status-im.contexts.wallet.common.account-switcher.view (:require - [quo.core :as quo] - [status-im.contexts.wallet.sheets.account-options.view :as account-options] - [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] - [status-im.contexts.wallet.sheets.select-account.view :as select-account] - [status-im.feature-flags :as ff] - [utils.re-frame :as rf])) + [quo.core :as quo] + [status-im.contexts.wallet.sheets.account-options.view :as account-options] + [status-im.contexts.wallet.sheets.network-filter.view :as network-filter] + [status-im.contexts.wallet.sheets.select-account.view :as select-account] + [status-im.feature-flags :as ff] + [utils.re-frame :as rf])) (defn get-bottom-sheet-args [switcher-type] diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 6c371558b6a..33b8c9160d2 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -1,107 +1,107 @@ (ns status-im.navigation.screens (:require - [legacy.status-im.ui.screens.screens :as old-screens] - [quo.foundations.colors :as colors] - [status-im.common.emoji-picker.view :as emoji-picker] - [status-im.common.enter-seed-phrase.view :as enter-seed-phrase] - [status-im.common.lightbox.view :as lightbox] - [status-im.config :as config] - [status-im.contexts.chat.group-create.view :as group-create] - [status-im.contexts.chat.group-details.view :as group-details] - [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] - [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] - [status-im.contexts.chat.home.new-chat.view :as new-chat] - [status-im.contexts.chat.messenger.camera.view :as camera-screen] - [status-im.contexts.chat.messenger.messages.view :as chat] - [status-im.contexts.chat.messenger.photo-selector.view :as photo-selector] - [status-im.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection] - [status-im.contexts.communities.actions.addresses-for-permissions.view :as - addresses-for-permissions] - [status-im.contexts.communities.actions.airdrop-addresses.view :as airdrop-addresses] - [status-im.contexts.communities.actions.channel-view-details.view :as - channel-view-channel-members-and-details] - [status-im.contexts.communities.actions.invite-contacts.view :as communities.invite] - [status-im.contexts.communities.actions.request-to-join.view :as join-menu] - [status-im.contexts.communities.actions.share-community-channel.view :as share-community-channel] - [status-im.contexts.communities.actions.share-community.view :as share-community] - [status-im.contexts.communities.discover.view :as communities.discover] - [status-im.contexts.communities.overview.view :as communities.overview] - [status-im.contexts.onboarding.create-password.view :as create-password] - [status-im.contexts.onboarding.create-profile.view :as create-profile] - [status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics] - [status-im.contexts.onboarding.enable-notifications.view :as enable-notifications] - [status-im.contexts.onboarding.generating-keys.view :as generating-keys] - [status-im.contexts.onboarding.identifiers.view :as identifiers] - [status-im.contexts.onboarding.intro.view :as intro] - [status-im.contexts.onboarding.new-to-status.view :as new-to-status] - [status-im.contexts.onboarding.sign-in.view :as sign-in] - [status-im.contexts.onboarding.syncing.progress.view :as syncing-devices] - [status-im.contexts.onboarding.syncing.results.view :as syncing-results] - [status-im.contexts.onboarding.welcome.view :as welcome] - [status-im.contexts.preview.feature-flags.view :as feature-flags] - [status-im.contexts.preview.quo.component-preview.view :as component-preview] - [status-im.contexts.preview.quo.main :as quo.preview] - [status-im.contexts.preview.status-im.main :as status-im-preview] - [status-im.contexts.profile.contact.share.view :as share-contact] - [status-im.contexts.profile.contact.view :as contact-profile] - [status-im.contexts.profile.edit.accent-colour.view :as edit-accent-colour] - [status-im.contexts.profile.edit.bio.view :as edit-bio] - [status-im.contexts.profile.edit.name.view :as edit-name] - [status-im.contexts.profile.edit.view :as edit-profile] - [status-im.contexts.profile.profiles.view :as profiles] - [status-im.contexts.profile.settings.screens.messages.blocked-users.view :as - settings.blocked-users] - [status-im.contexts.profile.settings.screens.messages.view :as settings.messages] - [status-im.contexts.profile.settings.screens.password.change-password.loading :as - change-password-loading] - [status-im.contexts.profile.settings.screens.password.change-password.view :as change-password] - [status-im.contexts.profile.settings.screens.password.view :as settings-password] - [status-im.contexts.profile.settings.view :as settings] - [status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings] - [status-im.contexts.settings.wallet.wallet-options.view :as wallet-options] - [status-im.contexts.shell.activity-center.view :as activity-center] - [status-im.contexts.shell.jump-to.view :as shell] - [status-im.contexts.shell.qr-reader.view :as shell-qr-reader] - [status-im.contexts.shell.share.view :as share] - [status-im.contexts.syncing.find-sync-code.view :as find-sync-code] - [status-im.contexts.syncing.how-to-pair.view :as how-to-pair] - [status-im.contexts.syncing.scan-sync-code-page.view :as scan-sync-code-page] - [status-im.contexts.syncing.setup-syncing.view :as settings-setup-syncing] - [status-im.contexts.syncing.syncing-devices-list.view :as settings-syncing] - [status-im.contexts.wallet.account.edit-account.view :as wallet-edit-account] - [status-im.contexts.wallet.account.share-address.view :as wallet-share-address] - [status-im.contexts.wallet.account.view :as wallet-accounts] - [status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as - wallet-confirm-address-to-watch] - [status-im.contexts.wallet.add-account.add-address-to-watch.view :as wallet-add-address-to-watch] - [status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as - wallet-edit-derivation-path] - [status-im.contexts.wallet.add-account.create-account.import-private-key.view :as - wallet-import-private-key] - [status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view :as - wallet-backup-recovery-phrase] - [status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view :as - wallet-check-your-backup] - [status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view :as - wallet-keypair-name] - [status-im.contexts.wallet.add-account.create-account.select-keypair.view :as wallet-select-keypair] - [status-im.contexts.wallet.add-account.create-account.view :as wallet-create-account] - [status-im.contexts.wallet.bridge.bridge-to.view :as wallet-bridge-to] - [status-im.contexts.wallet.bridge.input-amount.view :as wallet-bridge-input-amount] - [status-im.contexts.wallet.bridge.select-asset.view :as wallet-bridge-select-asset] - [status-im.contexts.wallet.collectible.view :as wallet-collectible] - [status-im.contexts.wallet.common.scan-account.view :as wallet-scan-address] - [status-im.contexts.wallet.connected-dapps.view :as wallet-connected-dapps] - [status-im.contexts.wallet.save-address.view :as wallet-save-address] - [status-im.contexts.wallet.send.from.view :as wallet-select-from] - [status-im.contexts.wallet.send.select-address.view :as wallet-select-address] - [status-im.contexts.wallet.send.select-asset.view :as wallet-select-asset] - [status-im.contexts.wallet.send.select-collectible-amount.view :as wallet-select-collectible-amount] - [status-im.contexts.wallet.send.send-amount.view :as wallet-send-input-amount] - [status-im.contexts.wallet.send.transaction-confirmation.view :as wallet-transaction-confirmation] - [status-im.contexts.wallet.send.transaction-progress.view :as wallet-transaction-progress] - [status-im.navigation.options :as options] - [status-im.navigation.transitions :as transitions])) + [legacy.status-im.ui.screens.screens :as old-screens] + [quo.foundations.colors :as colors] + [status-im.common.emoji-picker.view :as emoji-picker] + [status-im.common.enter-seed-phrase.view :as enter-seed-phrase] + [status-im.common.lightbox.view :as lightbox] + [status-im.config :as config] + [status-im.contexts.chat.group-create.view :as group-create] + [status-im.contexts.chat.group-details.view :as group-details] + [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] + [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] + [status-im.contexts.chat.home.new-chat.view :as new-chat] + [status-im.contexts.chat.messenger.camera.view :as camera-screen] + [status-im.contexts.chat.messenger.messages.view :as chat] + [status-im.contexts.chat.messenger.photo-selector.view :as photo-selector] + [status-im.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection] + [status-im.contexts.communities.actions.addresses-for-permissions.view :as + addresses-for-permissions] + [status-im.contexts.communities.actions.airdrop-addresses.view :as airdrop-addresses] + [status-im.contexts.communities.actions.channel-view-details.view :as + channel-view-channel-members-and-details] + [status-im.contexts.communities.actions.invite-contacts.view :as communities.invite] + [status-im.contexts.communities.actions.request-to-join.view :as join-menu] + [status-im.contexts.communities.actions.share-community-channel.view :as share-community-channel] + [status-im.contexts.communities.actions.share-community.view :as share-community] + [status-im.contexts.communities.discover.view :as communities.discover] + [status-im.contexts.communities.overview.view :as communities.overview] + [status-im.contexts.onboarding.create-password.view :as create-password] + [status-im.contexts.onboarding.create-profile.view :as create-profile] + [status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics] + [status-im.contexts.onboarding.enable-notifications.view :as enable-notifications] + [status-im.contexts.onboarding.generating-keys.view :as generating-keys] + [status-im.contexts.onboarding.identifiers.view :as identifiers] + [status-im.contexts.onboarding.intro.view :as intro] + [status-im.contexts.onboarding.new-to-status.view :as new-to-status] + [status-im.contexts.onboarding.sign-in.view :as sign-in] + [status-im.contexts.onboarding.syncing.progress.view :as syncing-devices] + [status-im.contexts.onboarding.syncing.results.view :as syncing-results] + [status-im.contexts.onboarding.welcome.view :as welcome] + [status-im.contexts.preview.feature-flags.view :as feature-flags] + [status-im.contexts.preview.quo.component-preview.view :as component-preview] + [status-im.contexts.preview.quo.main :as quo.preview] + [status-im.contexts.preview.status-im.main :as status-im-preview] + [status-im.contexts.profile.contact.share.view :as share-contact] + [status-im.contexts.profile.contact.view :as contact-profile] + [status-im.contexts.profile.edit.accent-colour.view :as edit-accent-colour] + [status-im.contexts.profile.edit.bio.view :as edit-bio] + [status-im.contexts.profile.edit.name.view :as edit-name] + [status-im.contexts.profile.edit.view :as edit-profile] + [status-im.contexts.profile.profiles.view :as profiles] + [status-im.contexts.profile.settings.screens.messages.blocked-users.view :as + settings.blocked-users] + [status-im.contexts.profile.settings.screens.messages.view :as settings.messages] + [status-im.contexts.profile.settings.screens.password.change-password.loading :as + change-password-loading] + [status-im.contexts.profile.settings.screens.password.change-password.view :as change-password] + [status-im.contexts.profile.settings.screens.password.view :as settings-password] + [status-im.contexts.profile.settings.view :as settings] + [status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings] + [status-im.contexts.settings.wallet.wallet-options.view :as wallet-options] + [status-im.contexts.shell.activity-center.view :as activity-center] + [status-im.contexts.shell.jump-to.view :as shell] + [status-im.contexts.shell.qr-reader.view :as shell-qr-reader] + [status-im.contexts.shell.share.view :as share] + [status-im.contexts.syncing.find-sync-code.view :as find-sync-code] + [status-im.contexts.syncing.how-to-pair.view :as how-to-pair] + [status-im.contexts.syncing.scan-sync-code-page.view :as scan-sync-code-page] + [status-im.contexts.syncing.setup-syncing.view :as settings-setup-syncing] + [status-im.contexts.syncing.syncing-devices-list.view :as settings-syncing] + [status-im.contexts.wallet.account.edit-account.view :as wallet-edit-account] + [status-im.contexts.wallet.account.share-address.view :as wallet-share-address] + [status-im.contexts.wallet.account.view :as wallet-accounts] + [status-im.contexts.wallet.add-account.add-address-to-watch.confirm-address.view :as + wallet-confirm-address-to-watch] + [status-im.contexts.wallet.add-account.add-address-to-watch.view :as wallet-add-address-to-watch] + [status-im.contexts.wallet.add-account.create-account.edit-derivation-path.view :as + wallet-edit-derivation-path] + [status-im.contexts.wallet.add-account.create-account.import-private-key.view :as + wallet-import-private-key] + [status-im.contexts.wallet.add-account.create-account.new-keypair.backup-recovery-phrase.view :as + wallet-backup-recovery-phrase] + [status-im.contexts.wallet.add-account.create-account.new-keypair.check-your-backup.view :as + wallet-check-your-backup] + [status-im.contexts.wallet.add-account.create-account.new-keypair.keypair-name.view :as + wallet-keypair-name] + [status-im.contexts.wallet.add-account.create-account.select-keypair.view :as wallet-select-keypair] + [status-im.contexts.wallet.add-account.create-account.view :as wallet-create-account] + [status-im.contexts.wallet.bridge.bridge-to.view :as wallet-bridge-to] + [status-im.contexts.wallet.bridge.input-amount.view :as wallet-bridge-input-amount] + [status-im.contexts.wallet.bridge.select-asset.view :as wallet-bridge-select-asset] + [status-im.contexts.wallet.collectible.view :as wallet-collectible] + [status-im.contexts.wallet.common.scan-account.view :as wallet-scan-address] + [status-im.contexts.wallet.connected-dapps.view :as wallet-connected-dapps] + [status-im.contexts.wallet.save-address.view :as wallet-save-address] + [status-im.contexts.wallet.send.from.view :as wallet-select-from] + [status-im.contexts.wallet.send.select-address.view :as wallet-select-address] + [status-im.contexts.wallet.send.select-asset.view :as wallet-select-asset] + [status-im.contexts.wallet.send.select-collectible-amount.view :as wallet-select-collectible-amount] + [status-im.contexts.wallet.send.send-amount.view :as wallet-send-input-amount] + [status-im.contexts.wallet.send.transaction-confirmation.view :as wallet-transaction-confirmation] + [status-im.contexts.wallet.send.transaction-progress.view :as wallet-transaction-progress] + [status-im.navigation.options :as options] + [status-im.navigation.transitions :as transitions])) (defn screens [] From f141b3cb9a4b74b2383aa87a11d261ce6ee1c761 Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 13:26:58 +0200 Subject: [PATCH 8/9] Small `boolean icon-name` fix --- src/quo/components/navigation/page_nav/view.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quo/components/navigation/page_nav/view.cljs b/src/quo/components/navigation/page_nav/view.cljs index 76522d6f852..12b33c81d75 100644 --- a/src/quo/components/navigation/page_nav/view.cljs +++ b/src/quo/components/navigation/page_nav/view.cljs @@ -65,7 +65,7 @@ [button/button (assoc button-props :type (button-type background) - :icon-only? icon-name + :icon-only? (boolean icon-name) :size 32 :accessible true :background (if behind-overlay? From 6a6327ad630a4a9d01853305eec06238771eedba Mon Sep 17 00:00:00 2001 From: alwx Date: Wed, 8 May 2024 14:44:47 +0200 Subject: [PATCH 9/9] Style fixes --- src/status_im/contexts/preview/quo/navigation/page_nav.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/status_im/contexts/preview/quo/navigation/page_nav.cljs b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs index 3d3720a18b7..05cebe6d668 100644 --- a/src/status_im/contexts/preview/quo/navigation/page_nav.cljs +++ b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs @@ -59,9 +59,9 @@ :value "2 actions"} {:key (take 3 options) :value "3 actions"} - {:key (conj account-switcher-option (take 1 options)) + {:key (conj (take 1 options) account-switcher-option) :value "1 action + account switcher"} - {:key (conj account-switcher-option (take 2 options)) + {:key (conj (take 2 options) account-switcher-option) :value "2 actions + account switcher"}])) (def no-title-descriptor