[15611] Lock orientation (#15915)

This commit is contained in:
flexsurfer 2023-05-16 16:54:21 +02:00 committed by GitHub
parent 7d0dfec22c
commit b5a8f0a127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -87,7 +87,6 @@
{:component {:id comp
:name comp
:options (merge (options/statusbar-and-navbar)
{:layout {:orientation :portrait}}
options
(if (:topBar options)
(options/merge-top-bar (options/topbar-options) options)
@ -167,7 +166,7 @@
:id comp
:options (merge (options/statusbar)
{:layout {:componentBackgroundColor :transparent
:orientation :portrait}
:orientation ["portrait"]}
:overlay {:interceptTouchOutside true}}
opts)}})))
@ -178,7 +177,8 @@
(fn []
(show-overlay "toasts"
{:overlay {:interceptTouchOutside false}
:layout {:componentBackgroundColor :transparent}})))
:layout {:componentBackgroundColor :transparent
:orientation ["portrait"]}})))
(re-frame/reg-fx :hide-toasts (fn [] (dissmiss-overlay "toasts")))
;; bottom sheet

View File

@ -4,7 +4,7 @@
(defn default-options
[]
{:layout {:orientation :portrait}
{:layout {:orientation ["portrait"]}
:topBar {:visible false}})
;; Note: Currently, the status bar style provided while setting the root has a high preference,
@ -27,14 +27,14 @@
{:topBar {:visible false}
:layout {:componentBackgroundColor (or background-color
(colors/theme-colors colors/white colors/neutral-100))
:orientation :portrait
:orientation ["portrait"]
:backgroundColor (or background-color
(colors/theme-colors colors/white
colors/neutral-100))}}))
(def onboarding-layout
{:componentBackgroundColor colors/neutral-80-opa-80-blur
:orientation :portrait
:orientation ["portrait"]
:backgroundColor colors/neutral-80-opa-80-blur})
(defn navbar
@ -75,7 +75,7 @@
(merge
{:modalPresentationStyle :overCurrentContext
:layout {:componentBackgroundColor :transparent
:orientation :portrait
:orientation ["portrait"]
:backgroundColor :transparent}}
(if platform/android?
{:statusBar {:backgroundColor :transparent
@ -85,6 +85,7 @@
(def sheet-options
{:layout {:componentBackgroundColor :transparent
:orientation ["portrait"]
:backgroundColor :transparent}
:modalPresentationStyle :overCurrentContext})