Browse Source

fix: align start node icon

Tienson Qin 5 months ago
parent
commit
37741d856e

+ 2 - 2
src/main/frontend/components/block.cljs

@@ -3285,7 +3285,7 @@
 (rum/defc breadcrumb
   [config repo block-id {:keys [_show-page? _indent? _end-separator? _navigating-block]
                          :as opts}]
-  (let [[block set-block!] (hooks/use-state (db/entity [:block/uuid block-id]))]
+  (let [[block set-block!] (hooks/use-state nil)]
     (hooks/use-effect!
      (fn []
        (p/let [block (db-async/<get-block (state/get-current-repo)
@@ -3293,7 +3293,7 @@
                                           {:children? false
                                            :skip-refresh? true})
                _ (when-let [id (:db/id block)]
-                   (db-async/<get-block-parents (state/get-current-repo) id 1000))]
+                   (db-async/<get-block-parents (state/get-current-repo) id 9))]
          (set-block! block)))
      [])
     (when block

+ 1 - 1
src/main/frontend/components/cmdk/list_item.cljs

@@ -82,7 +82,7 @@
                                       :style {:color "var(--lx-gray-11)"}}
         (highlight-query header)])
      ;; main row
-     [:div.flex.items-center.gap-3
+     [:div.flex.items-start.gap-3
       [:div.w-5.h-5.rounded.flex.items-center.justify-center
        {:style {:background (when (#{:gradient} icon-theme) "linear-gradient(-65deg, #8AE8FF, #5373E7, #369EFF, #00B1CC)")
                 :box-shadow (when (#{:gradient} icon-theme) "inset 0 0 0 1px rgba(255,255,255,0.3) ")}

+ 4 - 4
src/main/frontend/components/editor.cljs

@@ -205,13 +205,13 @@
                                          block)
                                        block)]
                           [:div.flex.flex-col
-                           (when (and (:block/uuid block') (:block/parent block'))
+                           (when (and (:block/uuid block') (or (:block/parent block') (not (:page? block))))
                              (when-let [breadcrumb (state/get-component :block/breadcrumb)]
                                [:div.text-xs.opacity-70.mb-1 {:style {:margin-left 3}}
                                 (breadcrumb {:search? true} (state/get-current-repo) (:block/uuid block') {})]))
-                           [:div.flex.flex-row.items-center.gap-1
+                           [:div.flex.flex-row.items-start
                             (when-not (or db-tag? (not db-based?))
-                              [:div.flex.items-center
+                              [:div.flex.items-center.h-5.mr-1.opacity-50
                                (cond
                                  (:nlp-date? block')
                                  (ui/icon "calendar" {:size 14})
@@ -225,7 +225,7 @@
                                  (db-model/whiteboard-page? block')
                                  (ui/icon "writing" {:size 14})
 
-                                 (or (ldb/page? block') (:page? block'))
+                                 (or (ldb/page? block') (:page? block))
                                  (ui/icon "file" {:size 14})
 
                                  (or (string/starts-with? (str (:block/title block')) (t :new-tag))