Browse Source

enhance(ui): add icon column to All pages

Andelf 2 years ago
parent
commit
6869bdefbc
1 changed files with 4 additions and 2 deletions
  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)]