From 969fec3c995d19e30e3aebff532a759bb4adc91f Mon Sep 17 00:00:00 2001 From: leizhe Date: Sun, 19 Dec 2021 19:06:07 +0800 Subject: [PATCH] enhance(mobile): enhance References margin and padding --- src/main/frontend/components/block.css | 8 ++++++++ src/main/frontend/components/header.cljs | 4 ++-- src/main/frontend/ui.cljs | 2 +- src/main/frontend/ui.css | 6 +++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/components/block.css b/src/main/frontend/components/block.css index 682adb274..4c4df158c 100644 --- a/src/main/frontend/components/block.css +++ b/src/main/frontend/components/block.css @@ -160,6 +160,14 @@ } } +html.is-mobile, +html.is-native-iphone, +html.is-native-android { + .references .block-control, .block-control:hover { + margin-left: -20px; + } +} + .block-ref { border-bottom: 0.5px solid; border-bottom-color: var(--ls-block-ref-link-text-color); diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index 90465b580..06d247197 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -200,13 +200,13 @@ (when (and (not (mobile-util/is-native-platform?)) (not (util/electron?))) (login logged?)) - + (when plugin-handler/lsp-enabled? (plugins/hook-ui-items :toolbar)) (when (not= (state/get-current-route) :home) (home-button)) - + (when (or (util/electron?) (mobile-util/native-ios?)) (back-and-forward)) diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index 5be3005b8..95aea21df 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -290,7 +290,7 @@ (when (util/safari?) (.add cl "is-safari")) (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 "native-iphone")) + (when (mobile-util/native-iphone?) (.add cl "is-native-iphone")) (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)] diff --git a/src/main/frontend/ui.css b/src/main/frontend/ui.css index 4c9dfca45..2d678487f 100644 --- a/src/main/frontend/ui.css +++ b/src/main/frontend/ui.css @@ -129,12 +129,16 @@ } } -html.is-native-andorid +html.is-native-andorid, html.is-native-iphone { .ui__modal { top: 22vh; } + + .references .foldable-title { + margin-left: 4px +} } html.is-mobile {