fix settings navigation (#18854)
This commit is contained in:
parent
6f8aa15b17
commit
9fab422e0c
|
@ -48,19 +48,19 @@
|
||||||
:blur? true
|
:blur? true
|
||||||
:action :arrow}]
|
:action :arrow}]
|
||||||
[{:title (i18n/label :t/syncing)
|
[{:title (i18n/label :t/syncing)
|
||||||
:on-press #(rf/dispatch [:navigate-to :settings-syncing])
|
:on-press #(rf/dispatch [:open-modal :settings-syncing])
|
||||||
:image-props :i/syncing
|
:image-props :i/syncing
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
:action :arrow}
|
:action :arrow}
|
||||||
{:title (i18n/label :t/notifications)
|
{:title (i18n/label :t/notifications)
|
||||||
:on-press #(rf/dispatch [:navigate-to :notifications])
|
:on-press #(rf/dispatch [:open-modal :notifications])
|
||||||
:image-props :i/activity-center
|
:image-props :i/activity-center
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
:action :arrow}
|
:action :arrow}
|
||||||
{:title (i18n/label :t/appearance)
|
{:title (i18n/label :t/appearance)
|
||||||
:on-press #(rf/dispatch [:navigate-to :appearance])
|
:on-press #(rf/dispatch [:open-modal :appearance])
|
||||||
:image-props :i/light
|
:image-props :i/light
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
|
@ -78,28 +78,28 @@
|
||||||
:blur? true
|
:blur? true
|
||||||
:action :arrow}
|
:action :arrow}
|
||||||
{:title (i18n/label :t/advanced)
|
{:title (i18n/label :t/advanced)
|
||||||
:on-press #(rf/dispatch [:navigate-to :advanced-settings])
|
:on-press #(rf/dispatch [:open-modal :advanced-settings])
|
||||||
:image-props :i/settings
|
:image-props :i/settings
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
:action :arrow}]
|
:action :arrow}]
|
||||||
;; temporary link to legacy settings
|
;; temporary link to legacy settings
|
||||||
[{:title "Legacy settings"
|
[{:title "Legacy settings"
|
||||||
:on-press #(rf/dispatch [:navigate-to :my-profile])
|
:on-press #(rf/dispatch [:open-modal :my-profile])
|
||||||
:action :arrow
|
:action :arrow
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
:image-props :i/toggle}
|
:image-props :i/toggle}
|
||||||
(when config/quo-preview-enabled?
|
(when config/quo-preview-enabled?
|
||||||
{:title "Quo preview"
|
{:title "Quo preview"
|
||||||
:on-press #(rf/dispatch [:navigate-to :quo-preview])
|
:on-press #(rf/dispatch [:open-modal :quo-preview])
|
||||||
:action :arrow
|
:action :arrow
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
:image-props :i/light})
|
:image-props :i/light})
|
||||||
(when config/quo-preview-enabled?
|
(when config/quo-preview-enabled?
|
||||||
{:title "Feature Flags"
|
{:title "Feature Flags"
|
||||||
:on-press #(rf/dispatch [:navigate-to :feature-flags])
|
:on-press #(rf/dispatch [:open-modal :feature-flags])
|
||||||
:action :arrow
|
:action :arrow
|
||||||
:image :icon
|
:image :icon
|
||||||
:blur? true
|
:blur? true
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
(:require
|
(:require
|
||||||
[quo.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def container-main
|
(defn container-main
|
||||||
|
[top]
|
||||||
{:background-color colors/neutral-95
|
{:background-color colors/neutral-95
|
||||||
|
:padding-top top
|
||||||
:flex 1})
|
:flex 1})
|
||||||
|
|
||||||
(def page-container
|
(def page-container
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
[quo.core :as quo]
|
[quo.core :as quo]
|
||||||
[quo.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
|
[react-native.safe-area :as safe-area]
|
||||||
[status-im.contexts.syncing.device.view :as device]
|
[status-im.contexts.syncing.device.view :as device]
|
||||||
[status-im.contexts.syncing.syncing-devices-list.style :as style]
|
[status-im.contexts.syncing.syncing-devices-list.style :as style]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
(defn view
|
(defn view
|
||||||
[]
|
[]
|
||||||
(let [devices (rf/sub [:pairing/installations])
|
(let [devices (rf/sub [:pairing/installations])
|
||||||
|
insets (safe-area/get-insets)
|
||||||
devices-with-button (map #(assoc % :show-button? true) devices)
|
devices-with-button (map #(assoc % :show-button? true) devices)
|
||||||
user-device (first devices-with-button)
|
user-device (first devices-with-button)
|
||||||
other-devices (rest devices-with-button)
|
other-devices (rest devices-with-button)
|
||||||
|
@ -18,7 +20,7 @@
|
||||||
{:keys [paired-devices unpaired-devices]} (group-by
|
{:keys [paired-devices unpaired-devices]} (group-by
|
||||||
#(if (:enabled? %) :paired-devices :unpaired-devices)
|
#(if (:enabled? %) :paired-devices :unpaired-devices)
|
||||||
other-devices)]
|
other-devices)]
|
||||||
[rn/view {:style style/container-main}
|
[rn/view {:style (style/container-main (:top insets))}
|
||||||
[quo/page-nav
|
[quo/page-nav
|
||||||
{:type :no-title
|
{:type :no-title
|
||||||
:background :blur
|
:background :blur
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
:component settings/view}
|
:component settings/view}
|
||||||
|
|
||||||
{:name :settings-syncing
|
{:name :settings-syncing
|
||||||
:options (merge options/dark-screen {:insets {:top? true}})
|
:options options/transparent-modal-screen-options
|
||||||
:component settings-syncing/view}
|
:component settings-syncing/view}
|
||||||
|
|
||||||
{:name :settings-setup-syncing
|
{:name :settings-setup-syncing
|
||||||
|
@ -425,7 +425,7 @@
|
||||||
;; Settings
|
;; Settings
|
||||||
|
|
||||||
{:name :settings-password
|
{:name :settings-password
|
||||||
:options options/transparent-screen-options
|
:options options/transparent-modal-screen-options
|
||||||
:component settings-password/view}]
|
:component settings-password/view}]
|
||||||
|
|
||||||
(when js/goog.DEBUG
|
(when js/goog.DEBUG
|
||||||
|
|
Loading…
Reference in New Issue