Browse Source

enhance(ui): add icon column to All pages

Andelf 2 năm trước cách đây
mục cha
commit
6869bdefbc
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      src/main/frontend/components/page.cljs

+ 4 - 2
src/main/frontend/components/page.cljs

@@ -1056,7 +1056,7 @@
                                               (doseq [{:block/keys [idx]} @*results]
                                                 (swap! *checks assoc idx (or indeterminate? (not all?))))))
                            :indeterminate (= -1 @*indeterminate)})]
-
+           [:th.icon ""]
            (sortable-title (t :block/name) :block/name *sort-by-item *desc?)
            (when-not mobile?
              [(sortable-title (t :page/backlinks) :block/backlinks *sort-by-item *desc?)
@@ -1072,7 +1072,9 @@
                               (get @*checks idx)
                               {:on-change (fn []
                                             (swap! *checks update idx not))})]
-
+               [:td.icon.w-4.p-0.overflow-hidden
+                (when-let [icon (get-in page [:block/properties :icon])]
+                  icon)]
                [:td.name [:a {:on-click (fn [e]
                                           (.preventDefault e)
                                           (let [repo (state/get-current-repo)]