move networks under dev mode

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2018-05-16 12:37:38 +03:00
parent 3f3684cddf
commit 6dec4876a2
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 16 additions and 15 deletions

View File

@ -126,11 +126,11 @@
[react/text @(re-frame/subscribe [:get-app-version])]]]])) [react/text @(re-frame/subscribe [:get-app-version])]]]]))
(defview advanced [{:keys [network networks dev-mode?]}] (defview advanced [{:keys [network networks dev-mode?]}]
(letsubs [advanced? [:get :my-profile/advanced?] (letsubs [advanced? [:get :my-profile/advanced?]
{:keys [sharing-usage-data?]} [:get-current-account]] {:keys [sharing-usage-data?]} [:get-current-account]]
[react/view [react/view
[react/touchable-highlight {:on-press #(re-frame/dispatch [:set :my-profile/advanced? (not advanced?)]) [react/touchable-highlight {:on-press #(re-frame/dispatch [:set :my-profile/advanced? (not advanced?)])
:style styles/advanced-button} :style styles/advanced-button}
[react/view {:style styles/advanced-button-container} [react/view {:style styles/advanced-button-container}
[react/view {:style styles/advanced-button-container-background} [react/view {:style styles/advanced-button-container-background}
[react/view {:style styles/advanced-button-row} [react/view {:style styles/advanced-button-row}
@ -139,29 +139,30 @@
[icons/icon (if advanced? :icons/up :icons/down) {:color colors/blue}]]]]] [icons/icon (if advanced? :icons/up :icons/down) {:color colors/blue}]]]]]
(when advanced? (when advanced?
[react/view [react/view
[profile.components/settings-item (when dev-mode?
{:label-kw :t/network [profile.components/settings-item
:value (get-in networks [network :name]) {:label-kw :t/network
:action-fn #(re-frame/dispatch [:navigate-to :network-settings]) :value (get-in networks [network :name])
:accessibility-label :network-button}] :action-fn #(re-frame/dispatch [:navigate-to :network-settings])
:accessibility-label :network-button}])
(when config/offline-inbox-enabled? (when config/offline-inbox-enabled?
[profile.components/settings-item-separator]) [profile.components/settings-item-separator])
(when config/offline-inbox-enabled? (when config/offline-inbox-enabled?
[profile.components/settings-item [profile.components/settings-item
{:label-kw :t/offline-messaging {:label-kw :t/offline-messaging
:action-fn #(re-frame/dispatch [:navigate-to :offline-messaging-settings]) :action-fn #(re-frame/dispatch [:navigate-to :offline-messaging-settings])
:accessibility-label :offline-messages-settings-button}]) :accessibility-label :offline-messages-settings-button}])
[profile.components/settings-item-separator] [profile.components/settings-item-separator]
[profile.components/settings-switch-item
{:label-kw :t/dev-mode
:value dev-mode?
:action-fn #(re-frame/dispatch [:switch-dev-mode %])}]
[profile.components/settings-item-separator]
[profile.components/settings-item [profile.components/settings-item
{:label-kw :t/help-improve? {:label-kw :t/help-improve?
:value (i18n/label (if sharing-usage-data? :on :off)) :value (i18n/label (if sharing-usage-data? :on :off))
:action-fn #(re-frame/dispatch [:navigate-to :usage-data [:navigate-back]]) :action-fn #(re-frame/dispatch [:navigate-to :usage-data [:navigate-back]])
:accessibility-label :help-improve}]])])) :accessibility-label :help-improve}]
[profile.components/settings-item-separator]
[profile.components/settings-switch-item
{:label-kw :t/dev-mode
:value dev-mode?
:action-fn #(re-frame/dispatch [:switch-dev-mode %])}]])]))
(defview my-profile [] (defview my-profile []
(letsubs [{:keys [public-key] :as current-account} [:get-current-account] (letsubs [{:keys [public-key] :as current-account} [:get-current-account]