fix: remove qa-only features(unicorn, skull) (#17594)
This commit is contained in:
parent
071d8f0925
commit
221c501279
|
@ -95,25 +95,12 @@
|
||||||
notification-count
|
notification-count
|
||||||
activity-center-on-press
|
activity-center-on-press
|
||||||
scan-on-press
|
scan-on-press
|
||||||
qr-code-on-press
|
qr-code-on-press]
|
||||||
for-qa-only-cellular-network
|
|
||||||
for-qa-only-no-network
|
|
||||||
for-qa-only-network-type]
|
|
||||||
:as props}]
|
:as props}]
|
||||||
(let [button-common-props (get-button-common-props {:theme theme
|
(let [button-common-props (get-button-common-props {:theme theme
|
||||||
:jump-to? jump-to?
|
:jump-to? jump-to?
|
||||||
:blur? blur?})]
|
:blur? blur?})]
|
||||||
[rn/view {:style style/right-section}
|
[rn/view {:style style/right-section}
|
||||||
(when (= for-qa-only-network-type "cellular")
|
|
||||||
[button/button
|
|
||||||
(merge (dissoc button-common-props :icon-only?)
|
|
||||||
for-qa-only-cellular-network)
|
|
||||||
"🦄"])
|
|
||||||
(when (= for-qa-only-network-type "none")
|
|
||||||
[button/button
|
|
||||||
(merge (dissoc button-common-props :icon-only?)
|
|
||||||
for-qa-only-no-network)
|
|
||||||
"💀"])
|
|
||||||
[button/button
|
[button/button
|
||||||
(assoc button-common-props :accessibility-label :open-scanner-button :on-press scan-on-press)
|
(assoc button-common-props :accessibility-label :open-scanner-button :on-press scan-on-press)
|
||||||
:i/scan]
|
:i/scan]
|
||||||
|
@ -160,8 +147,5 @@
|
||||||
:qr-code-on-press callback
|
:qr-code-on-press callback
|
||||||
:notification-count number
|
:notification-count number
|
||||||
:max-unread-notifications used to specify max number for counter
|
:max-unread-notifications used to specify max number for counter
|
||||||
:for-qa-only-cellular-network used for testing purposed
|
|
||||||
:for-qa-only-no-network used for testing purposed
|
|
||||||
:for-qa-only-network-type used for testing purposed
|
|
||||||
"
|
"
|
||||||
(quo.theme/with-theme view-internal))
|
(quo.theme/with-theme view-internal))
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
(map? view)
|
(map? view)
|
||||||
(merge view)
|
(merge view)
|
||||||
|
|
||||||
(= view :mobile-network)
|
|
||||||
(merge mobile-network-settings/settings-sheet)
|
|
||||||
|
|
||||||
(= view :mobile-network-offline)
|
(= view :mobile-network-offline)
|
||||||
(merge mobile-network-settings/offline-sheet)
|
(merge mobile-network-settings/offline-sheet)
|
||||||
|
|
||||||
|
|
|
@ -29,15 +29,6 @@
|
||||||
cofx
|
cofx
|
||||||
{:db (assoc db :network-status/initialized? true)}
|
{:db (assoc db :network-status/initialized? true)}
|
||||||
(cond
|
(cond
|
||||||
(and logged-in?
|
|
||||||
(utils/cellular? (:network/type db))
|
|
||||||
(not remember-syncing-choice?)
|
|
||||||
(not= :create-multiaccount (:view-id db)))
|
|
||||||
|
|
||||||
[(bottom-sheet/show-bottom-sheet-old
|
|
||||||
{:view :mobile-network})
|
|
||||||
(sheet-defaults)]
|
|
||||||
|
|
||||||
;; NOTE(rasom): When we log into account on-network-status-change is
|
;; NOTE(rasom): When we log into account on-network-status-change is
|
||||||
;; dispatched, but that doesn't mean there was a status change, thus
|
;; dispatched, but that doesn't mean there was a status change, thus
|
||||||
;; no reason to restart wallet.
|
;; no reason to restart wallet.
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
(ns status-im.ui.screens.mobile-network-settings.sheets
|
(ns status-im.ui.screens.mobile-network-settings.sheets
|
||||||
(:require-macros [status-im.utils.views :as views])
|
(:require-macros [status-im.utils.views :as views])
|
||||||
(:require
|
(:require [re-frame.core :as re-frame]
|
||||||
[re-frame.core :as re-frame]
|
|
||||||
[status-im.ui.components.checkbox.view :as checkbox]
|
|
||||||
[status-im.ui.components.list.item :as list.item]
|
[status-im.ui.components.list.item :as list.item]
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
|
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
|
||||||
|
@ -36,65 +34,6 @@
|
||||||
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
|
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
|
||||||
(i18n/label :t/mobile-network-go-to-settings)]])
|
(i18n/label :t/mobile-network-go-to-settings)]])
|
||||||
|
|
||||||
(views/defview checkbox
|
|
||||||
[]
|
|
||||||
(views/letsubs [checked? [:mobile-network/remember-choice?]]
|
|
||||||
[react/view
|
|
||||||
{:style styles/checkbox-line-container
|
|
||||||
:accessibility-label "remember-choice"}
|
|
||||||
[checkbox/checkbox
|
|
||||||
{:checked? checked?
|
|
||||||
:style styles/checkbox
|
|
||||||
:icon-style styles/checkbox-icon
|
|
||||||
:on-value-change #(re-frame/dispatch [:mobile-network/remember-choice? %])}]
|
|
||||||
[react/view
|
|
||||||
{:style styles/checkbox-text-container}
|
|
||||||
[react/text (i18n/label :t/mobile-network-sheet-remember-choice)]]]))
|
|
||||||
|
|
||||||
(defn settings
|
|
||||||
[]
|
|
||||||
[react/view
|
|
||||||
{:style styles/settings-container}
|
|
||||||
[react/nested-text
|
|
||||||
{:style styles/settings-text
|
|
||||||
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
|
|
||||||
(i18n/label :t/mobile-network-sheet-configure)
|
|
||||||
[{:style styles/settings-link}
|
|
||||||
(str " " (i18n/label :t/mobile-network-sheet-settings))]]])
|
|
||||||
|
|
||||||
(defn hide-sheet-and-dispatch
|
|
||||||
[event]
|
|
||||||
(re-frame/dispatch [:bottom-sheet/hide-old])
|
|
||||||
(re-frame/dispatch event))
|
|
||||||
|
|
||||||
(views/defview settings-sheet
|
|
||||||
[]
|
|
||||||
[react/view {:flex 1}
|
|
||||||
[react/view {:align-items :center}
|
|
||||||
[title :mobile-syncing-sheet-title]
|
|
||||||
[details :mobile-syncing-sheet-details]]
|
|
||||||
[list.item/list-item
|
|
||||||
{:theme :accent
|
|
||||||
:accessibility-label "mobile-network-continue-syncing"
|
|
||||||
:title (i18n/label :t/mobile-network-continue-syncing)
|
|
||||||
:subtitle (i18n/label :t/mobile-network-continue-syncing-details)
|
|
||||||
:subtitle-max-lines 2
|
|
||||||
:icon :main-icons/network
|
|
||||||
:on-press #(hide-sheet-and-dispatch [:mobile-network/continue-syncing])}]
|
|
||||||
[list.item/list-item
|
|
||||||
{:theme :negative
|
|
||||||
:accessibility-label "mobile-network-stop-syncing"
|
|
||||||
:title (i18n/label :t/mobile-network-stop-syncing)
|
|
||||||
:subtitle (i18n/label :t/mobile-network-stop-syncing-details)
|
|
||||||
:icon :main-icons/cancel
|
|
||||||
:on-press #(hide-sheet-and-dispatch [:mobile-network/stop-syncing])}]
|
|
||||||
[separator]
|
|
||||||
[react/view
|
|
||||||
{:flex 1
|
|
||||||
:align-self :stretch}
|
|
||||||
[checkbox]
|
|
||||||
[settings]]])
|
|
||||||
|
|
||||||
(views/defview offline-sheet
|
(views/defview offline-sheet
|
||||||
[]
|
[]
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
|
|
|
@ -53,8 +53,5 @@
|
||||||
:on-press #(hide-sheet-and-dispatch [:mobile-network/restore-defaults])}
|
:on-press #(hide-sheet-and-dispatch [:mobile-network/restore-defaults])}
|
||||||
(i18n/label :t/restore-defaults)]]]))
|
(i18n/label :t/restore-defaults)]]]))
|
||||||
|
|
||||||
(def settings-sheet
|
|
||||||
{:content sheets/settings-sheet})
|
|
||||||
|
|
||||||
(def offline-sheet
|
(def offline-sheet
|
||||||
{:content sheets/offline-sheet})
|
{:content sheets/offline-sheet})
|
||||||
|
|
|
@ -1,21 +1,12 @@
|
||||||
(ns status-im2.common.home.top-nav.view
|
(ns status-im2.common.home.top-nav.view
|
||||||
(:require
|
(:require
|
||||||
[quo.core :as quo]
|
[quo.core :as quo]
|
||||||
[react-native.core :as rn]
|
|
||||||
[status-im.multiaccounts.core :as multiaccounts]
|
[status-im.multiaccounts.core :as multiaccounts]
|
||||||
[status-im2.common.home.top-nav.style :as style]
|
[status-im2.common.home.top-nav.style :as style]
|
||||||
[status-im2.constants :as constants]
|
[status-im2.constants :as constants]
|
||||||
[utils.debounce :refer [dispatch-and-chill]]
|
[utils.debounce :refer [dispatch-and-chill]]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(defn connectivity-sheet
|
|
||||||
[]
|
|
||||||
(let [peers-count (rf/sub [:peers-count])
|
|
||||||
network-type (rf/sub [:network/type])]
|
|
||||||
[rn/view
|
|
||||||
[quo/text {:accessibility-label :peers-network-type-text} (str "NETWORK TYPE: " network-type)]
|
|
||||||
[quo/text {:accessibility-label :peers-count-text} (str "PEERS COUNT: " peers-count)]]))
|
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
"[top-nav props]
|
"[top-nav props]
|
||||||
props
|
props
|
||||||
|
@ -30,7 +21,6 @@
|
||||||
avatar {:online? online?
|
avatar {:online? online?
|
||||||
:full-name (multiaccounts/displayed-name account)
|
:full-name (multiaccounts/displayed-name account)
|
||||||
:profile-picture (multiaccounts/displayed-photo account)}
|
:profile-picture (multiaccounts/displayed-photo account)}
|
||||||
network-type (rf/sub [:network/type])
|
|
||||||
unread-count (rf/sub [:activity-center/unread-count])
|
unread-count (rf/sub [:activity-center/unread-count])
|
||||||
indicator (rf/sub [:activity-center/unread-indicator])
|
indicator (rf/sub [:activity-center/unread-indicator])
|
||||||
notification-type (case indicator
|
notification-type (case indicator
|
||||||
|
@ -52,11 +42,4 @@
|
||||||
:avatar-props avatar
|
:avatar-props avatar
|
||||||
:max-unread-notifications constants/activity-center-max-unread-count
|
:max-unread-notifications constants/activity-center-max-unread-count
|
||||||
:notification-count unread-count
|
:notification-count unread-count
|
||||||
:notification notification-type
|
:notification notification-type}]))
|
||||||
:for-qa-only-cellular-network {:accessibility-label :on-cellular-network
|
|
||||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
|
||||||
{:content connectivity-sheet}])}
|
|
||||||
:for-qa-only-no-network {:accessibility-label :no-network-connection
|
|
||||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
|
||||||
{:content connectivity-sheet}])}
|
|
||||||
:for-qa-only-network-type network-type}]))
|
|
||||||
|
|
Loading…
Reference in New Issue