Chore: setup feature-flag for not-implemented settings (#19591)
This commit is contained in:
parent
5badb5bdb5
commit
3164cc6a6c
1
.env
1
.env
|
@ -35,3 +35,4 @@ LOCAL_PAIRING_ENABLED=1
|
|||
TEST_STATEOFUS=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
|
|
1
.env.e2e
1
.env.e2e
|
@ -34,3 +34,4 @@ STICKERS_TEST_ENABLED=1
|
|||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
|
|
|
@ -36,3 +36,4 @@ STICKERS_TEST_ENABLED=1
|
|||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
(def swap-enabled? (enabled? (get-config :SWAP_ENABLED "0")))
|
||||
(def stickers-test-enabled? (enabled? (get-config :STICKERS_TEST_ENABLED "0")))
|
||||
(def local-pairing-mode-enabled? (enabled? (get-config :LOCAL_PAIRING_ENABLED "1")))
|
||||
(def show-not-implemented-features? (enabled? (get-config :SHOW_NOT_IMPLEMENTED_FEATURES "0")))
|
||||
|
||||
;; CONFIG VALUES
|
||||
(def log-level (string/upper-case (get-config :LOG_LEVEL "")))
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
(:require [legacy.status-im.utils.core :as utils]
|
||||
[quo.foundations.colors :as colors]
|
||||
[status-im.common.not-implemented :as not-implemented]
|
||||
[status-im.config :as config]
|
||||
[status-im.contexts.profile.edit.style :as style]
|
||||
[status-im.contexts.profile.utils :as profile.utils]
|
||||
[utils.i18n :as i18n]
|
||||
|
@ -36,31 +37,33 @@
|
|||
:action :arrow
|
||||
:container-style style/item-container}]}
|
||||
|
||||
{:label (i18n/label :t/showcase)
|
||||
:items [{:title (i18n/label :t/communities)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/accounts)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/collectibles)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/assets)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}]}
|
||||
(when config/show-not-implemented-features?
|
||||
{:label (i18n/label :t/showcase)
|
||||
:items [{:title (i18n/label :t/communities)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/accounts)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/collectibles)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}
|
||||
{:title (i18n/label :t/assets)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}]})
|
||||
|
||||
{:label (i18n/label :t/on-the-web)
|
||||
:items [{:title (i18n/label :t/links)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}]}]))
|
||||
(when config/show-not-implemented-features?
|
||||
{:label (i18n/label :t/on-the-web)
|
||||
:items [{:title (i18n/label :t/links)
|
||||
:on-press not-implemented/alert
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:container-style style/item-container}]})]))
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
[react-native.core :as rn]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[status-im.common.not-implemented :as not-implemented]
|
||||
[status-im.config :as config]
|
||||
[status-im.contexts.profile.edit.header.view :as header]
|
||||
[status-im.contexts.profile.edit.list-items :as edit.items]
|
||||
[status-im.contexts.profile.edit.style :as style]
|
||||
|
@ -33,7 +34,8 @@
|
|||
:background :blur
|
||||
:icon-name :i/arrow-left
|
||||
:on-press #(rf/dispatch [:navigate-back])
|
||||
:right-side [{:icon-name :i/reveal :on-press not-implemented/alert}]}]
|
||||
:right-side (when config/show-not-implemented-features?
|
||||
[{:icon-name :i/reveal :on-press not-implemented/alert}])}]
|
||||
[rn/flat-list
|
||||
{:key :list
|
||||
:header [header/view]
|
||||
|
|
|
@ -17,36 +17,41 @@
|
|||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}]
|
||||
[{:title (i18n/label :t/messages)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/messages
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/wallet)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/wallet
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/dapps)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/placeholder
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/browser)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/browser
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/keycard)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/keycard
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}]
|
||||
[(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/messages)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/messages
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/wallet)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/wallet
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/dapps)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/placeholder
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/browser)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/browser
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/keycard)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/keycard
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})]
|
||||
[{:title (i18n/label :t/syncing)
|
||||
:on-press #(rf/dispatch [:open-modal :settings-syncing])
|
||||
:image-props :i/syncing
|
||||
|
@ -65,18 +70,20 @@
|
|||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/language-and-currency)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/globe
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}]
|
||||
[{:title (i18n/label :t/data-usage)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/mobile
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/language-and-currency)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/globe
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})]
|
||||
[(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/data-usage)
|
||||
:on-press not-implemented/alert
|
||||
:image-props :i/mobile
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow})
|
||||
{:title (i18n/label :t/advanced)
|
||||
:on-press #(rf/dispatch [:open-modal :advanced-settings])
|
||||
:image-props :i/settings
|
||||
|
@ -105,8 +112,8 @@
|
|||
:blur? true
|
||||
:image-props :i/light})]
|
||||
[{:title (i18n/label :t/about)
|
||||
:on-press not-implemented/alert
|
||||
:on-press #(rf/dispatch [:open-modal :about-app])
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/status-help)
|
||||
:on-press not-implemented/alert
|
||||
:on-press #(rf/dispatch [:open-modal :help-center])
|
||||
:action :arrow}]])
|
||||
|
|
Loading…
Reference in New Issue