diff --git a/src/main/frontend/components/header.css b/src/main/frontend/components/header.css index 95b7ef647..3da08d055 100644 --- a/src/main/frontend/components/header.css +++ b/src/main/frontend/components/header.css @@ -173,8 +173,11 @@ a.button { cursor: default !important; } -html.is-native-ios, +html.is-native-ipad, html.is-ios.is-safari { + --ls-headbar-inner-top-padding: 0px; + --ls-headbar-height: 4rem; + #main-container { padding-top: 20px; } @@ -189,7 +192,7 @@ html.is-ios.is-safari { } } -html.is-ios { +html.is-native-iphone { --ls-headbar-inner-top-padding: 36px; .cp__header > .r { @@ -197,9 +200,7 @@ html.is-ios { } @screen sm { - --ls-headbar-inner-top-padding: 0px; - --ls-headbar-height: 4rem; - + .cp__header { background-color: transparent !important; display: flex; @@ -244,4 +245,4 @@ html.is-ios { margin-top: 8px; } } -} \ No newline at end of file +} diff --git a/src/main/frontend/mobile/util.cljs b/src/main/frontend/mobile/util.cljs index 652621a7a..8640a4a3c 100644 --- a/src/main/frontend/mobile/util.cljs +++ b/src/main/frontend/mobile/util.cljs @@ -69,11 +69,12 @@ :iPhoneSE4 {:width 320 :height 568 :statusbar 20} :iPodtouch5 {:width 320 :height 568 :statusbar 20}})) + (defn get-idevice-model [] (when (native-ios?) - (let [width (.-innerWidth js/window) - height (.-innerHeight js/window) + (let [width (.-width js/screen) + height (.-height js/screen) landscape? (> width height) [width height] (if landscape? [height width] [width height])] [(case [width height] @@ -103,7 +104,7 @@ (defn native-ipad? [] (when-let [model (get-idevice-model)] - (str/starts-with? (first model) "iPad"))) + (str/starts-with? (first model) "iPad"))) (defn get-idevice-statusbar-height [] diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 95aea21df..74f8690fc 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -291,6 +291,7 @@ (when (mobile-util/native-ios?) (.add cl "is-native-ios")) (when (mobile-util/native-android?) (.add cl "is-native-android")) (when (mobile-util/native-iphone?) (.add cl "is-native-iphone")) + (when (mobile-util/native-ipad?) (.add cl "is-native-ipad")) (when (util/electron?) (js/window.apis.on "full-screen" #(js-invoke cl (if (= % "enter") "add" "remove") "is-fullscreen")) (p/then (ipc/ipc :getAppBaseInfo) #(let [{:keys [isFullScreen]} (js->clj % :keywordize-keys true)]