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

View File

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