diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index 3952bebc95..3901a0b743 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -240,19 +240,25 @@ (js/window.apis.toggleMaxOrMinActiveWindow)))) :style {:fontSize 50}} [:div.l.flex - (left-menu-button {:on-click (fn [] - (open-fn) - (state/set-left-sidebar-open! - (not (:ui/left-sidebar-open? @state/state))))}) + (when-not (mobile-util/native-platform?) + (left-menu-button {:on-click (fn [] + (open-fn) + (state/set-left-sidebar-open! + (not (:ui/left-sidebar-open? @state/state))))}) - (when current-repo ;; this is for the Search button - (ui/with-shortcut :go/search "right" - [:a.button#search-button - {:on-click #(do (when (or (mobile-util/native-android?) - (mobile-util/native-iphone?)) - (state/set-left-sidebar-open! false)) - (state/pub-event! [:go/search]))} - (ui/icon "search" {:style {:fontSize ui/icon-size}})]))] + (when current-repo ;; this is for the Search button + (ui/with-shortcut :go/search "right" + [:a.button#search-button + {:on-click #(do (when (or (mobile-util/native-android?) + (mobile-util/native-iphone?)) + (state/set-left-sidebar-open! false)) + (state/pub-event! [:go/search]))} + (ui/icon "search" {:style {:fontSize ui/icon-size}})]))) + (when (mobile-util/native-platform?) + (ui/with-shortcut :go/backward "bottom" + [:a.it.navigation.nav-left.button + {:title "Go back" :on-click #(js/window.history.back)} + (ui/icon "chevron-left" {:style {:fontSize ui/icon-size}})]))] [:div.r.flex (when-not file-sync-handler/hiding-login&file-sync @@ -265,8 +271,7 @@ (when (not= (state/get-current-route) :home) (home-button)) - (when (or (util/electron?) - (mobile-util/native-ios?)) + (when (util/electron?) (back-and-forward)) (when-not (mobile-util/native-platform?) diff --git a/src/main/frontend/components/header.css b/src/main/frontend/components/header.css index 06428532ca..00f2e3b863 100644 --- a/src/main/frontend/components/header.css +++ b/src/main/frontend/components/header.css @@ -1,5 +1,4 @@ .cp__header { - @apply shadow z-10; -webkit-app-region: drag; padding-top: var(--ls-headbar-inner-top-padding); @@ -239,8 +238,14 @@ html.is-native-ipad { } } - .cp__header > .r { - display: flex; + .cp__header { + > .r { + display: flex; + } + + a.button { + opacity: 1; + } } } @@ -316,10 +321,6 @@ html.is-native-iphone { @media (orientation: landscape) { --ls-headbar-inner-top-padding: 8px; --ls-headbar-height: 2.5rem; - - .cp__header { - @apply shadow z-10; - } } } @@ -332,10 +333,6 @@ html.is-native-iphone-without-notch { --ls-headbar-inner-top-padding: 0px; --ls-headbar-height: 2.5rem; - - .cp__header { - @apply shadow z-10; - } } } @@ -345,9 +342,5 @@ html.is-zoomed-native-ios { @media (orientation: landscape) { --ls-headbar-inner-top-padding: 8px; --ls-headbar-height: 2.5rem; - - .cp__header { - @apply shadow z-10; - } } } diff --git a/src/main/frontend/mobile/footer.cljs b/src/main/frontend/mobile/footer.cljs index 14cc6d91f6..34b1a594f8 100644 --- a/src/main/frontend/mobile/footer.cljs +++ b/src/main/frontend/mobile/footer.cljs @@ -1,13 +1,14 @@ (ns frontend.mobile.footer (:require [clojure.string :as string] + [frontend.components.svg :as svg] [frontend.date :as date] [frontend.handler.editor :as editor-handler] [frontend.mobile.record :as record] + [frontend.mobile.util :as mobile-util] [frontend.state :as state] [frontend.ui :as ui] [frontend.util :as util] - [rum.core :as rum] - [frontend.components.svg :as svg])) + [rum.core :as rum])) (rum/defc mobile-bar-command [command-handler icon] [:button.bottom-action @@ -55,7 +56,12 @@ (state/get-current-repo)) [:div.cp__footer.w-full.bottom-0.justify-between (audio-record-cp) - (mobile-bar-command #(state/toggle-document-mode!) "notes") + (mobile-bar-command + #(do (when-not (mobile-util/native-ipad?) + (state/set-left-sidebar-open! false)) + (state/pub-event! [:go/search])) + "search") + (mobile-bar-command state/toggle-document-mode! "notes") (mobile-bar-command #(let [page (or (state/get-current-page) (string/lower-case (date/journal-name)))] diff --git a/src/main/frontend/mobile/index.css b/src/main/frontend/mobile/index.css index cb18f338ce..33774dd66f 100644 --- a/src/main/frontend/mobile/index.css +++ b/src/main/frontend/mobile/index.css @@ -11,11 +11,10 @@ height: 80px; align-items: start; /* border-top: 1.5px solid var(--ls-tertiary-border-color); */ - box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.10); - + box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05); + .ti, .timer { color: var(--ls-primary-text-color); - opacity: 0.5; } .timer { diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 6a0343da41..7ce2f7714f 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -46,7 +46,7 @@ (util/safari?) (js/window.scrollTo 0 0))) -(defonce icon-size (if (mobile-util/native-platform?) 23 20)) +(defonce icon-size (if (mobile-util/native-platform?) 25 20)) (rum/defc ls-textarea < rum/reactive