Browse Source

fix(mobile): layout for the quick add blocks editor

charlie 4 months ago
parent
commit
db696613fe
1 changed files with 12 additions and 11 deletions
  1. 12 11
      src/main/frontend/components/quick_add.cljs

+ 12 - 11
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)]))))