From db696613fe962b5e93391ee5261a33bc3cb53312 Mon Sep 17 00:00:00 2001 From: charlie Date: Wed, 30 Jul 2025 16:14:56 +0800 Subject: [PATCH] fix(mobile): layout for the quick add blocks editor --- src/main/frontend/components/quick_add.cljs | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/frontend/components/quick_add.cljs b/src/main/frontend/components/quick_add.cljs index dde742db4c..9792db9a83 100644 --- a/src/main/frontend/components/quick_add.cljs +++ b/src/main/frontend/components/quick_add.cljs @@ -7,6 +7,7 @@ [frontend.handler.editor :as editor-handler] [frontend.state :as state] [frontend.util :as util] + [mobile.components.ui :as mobile-ui] [logseq.common.config :as common-config] [logseq.db :as ldb] [logseq.shui.ui :as shui] @@ -42,20 +43,20 @@ (let [mobile? (util/mobile?) add-button [:div (shui/button - {:variant :default - :size :sm - :on-click (fn [_e] - (editor-handler/quick-add-blocks!))} - (when-not mobile? (shui/shortcut ["mod" "e"])) - "Add to today")]] + {:variant :default + :size :sm + :on-click (fn [_e] + (editor-handler/quick-add-blocks!))} + (when-not mobile? (shui/shortcut ["mod" "e"])) + "Add to today")]] [:div.ls-quick-add.flex.flex-1.flex-col.w-full.gap-4 [:div.border-b.pb-4.flex.flex-row.justify-between.gap-4.items-center [:div.font-medium "Quick add"] (when mobile? add-button)] - [:div.content - {:class (if mobile? - "flex flex-1 flex-col w-full" - "block -ml-6")} - (page-blocks add-page)] + (if mobile? + (mobile-ui/classic-app-container-wrap + (page-blocks add-page)) + [:div.content {:class "block -ml-6"} + (page-blocks add-page)]) (when-not mobile? add-button)]))))