Browse Source

enhance: use tabler icons instead of our own extensions

Tienson Qin 6 months ago
parent
commit
0683dd6a56

+ 4 - 4
src/main/frontend/components/cmdk/core.cljs

@@ -58,7 +58,7 @@
   (let [current-page (state/get-current-page)]
     (->>
      [(when current-page
-        {:filter {:group :current-page} :text "Search only current page" :info "Add filter to search" :icon-theme :gray :icon "page"})
+        {:filter {:group :current-page} :text "Search only current page" :info "Add filter to search" :icon-theme :gray :icon "file"})
       {:filter {:group :nodes} :text "Search only nodes" :info "Add filter to search" :icon-theme :gray :icon "letter-n"}
       {:filter {:group :commands} :text "Search only commands" :info "Add filter to search" :icon-theme :gray :icon "command"}
       {:filter {:group :files} :text "Search only files" :info "Add filter to search" :icon-theme :gray :icon "file"}
@@ -200,9 +200,9 @@
     (ldb/property? entity)
     "letter-p"
     (ldb/whiteboard? entity)
-    "whiteboard"
+    "writing"
     :else
-    "page"))
+    "file"))
 
 (defmethod load-results :initial [_ state]
   (when-let [db (db/get-db)]
@@ -630,7 +630,7 @@
       [:div.search-results
        (for [item visible-items
              :let [highlighted? (= item highlighted-item)
-                   page? (= "page" (some-> item :icon))
+                   page? (= "file" (some-> item :icon))
                    text (some-> item :text)
                    source-page (some-> item :source-page)
                    hls-page? (and page? (pdf-utils/hls-file? (:block/title source-page)))]]

+ 1 - 2
src/main/frontend/components/container.cljs

@@ -283,8 +283,7 @@
                 :href (rfe/href :whiteboards)
                 :on-click-handler (fn [_e] (whiteboard-handler/onboarding-show))
                 :active (and (not srs-open?) (#{:whiteboard :whiteboards} route-name))
-                :icon "whiteboard"
-                :icon-extension? true
+                :icon "writing"
                 :shortcut :go/whiteboards})))
 
           (= nav :flashcards)

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

@@ -203,10 +203,10 @@
                                  (ui/icon "letter-p" {:size 14})
 
                                  (db-model/whiteboard-page? block')
-                                 (ui/icon "whiteboard" {:extension? true})
+                                 (ui/icon "writing")
 
                                  (:page? block')
-                                 (ui/icon "page" {:extension? true})
+                                 (ui/icon "file")
 
                                  (or (string/starts-with? (str (:block/title block')) (t :new-tag))
                                      (string/starts-with? (str (:block/title block')) (t :new-page)))

+ 3 - 3
src/main/frontend/components/icon.cljs

@@ -53,9 +53,9 @@
             (ldb/property? node-entity)
             "letter-p"
             (ldb/whiteboard? node-entity)
-            "whiteboard"
+            "writing"
             (ldb/page? node-entity)
-            "page"
+            "file"
             (= asset-type "pdf")
             "book"
             :else
@@ -67,7 +67,7 @@
         node-icon (if (:own-icon? opts)
                     (get node-entity (pu/get-pid :logseq.property/icon))
                     (get-node-icon node-entity))]
-    (when-not (or (string/blank? node-icon) (and (contains? #{"letter-n" "page"} node-icon) (:not-text-or-page? opts)))
+    (when-not (or (string/blank? node-icon) (and (contains? #{"letter-n" "file"} node-icon) (:not-text-or-page? opts)))
       [:div.icon-cp-container.flex.items-center
        (merge {:style {:color (or (:color node-icon) "inherit")}}
               (select-keys opts [:class]))

+ 1 - 1
src/main/frontend/components/repo.cljs

@@ -375,7 +375,7 @@
                                      {:as-dropdown? true
                                       :content-props {:class "repos-list"}
                                       :align :start}))}
-      [:span.thumb (shui/tabler-icon (if remote? "cloud" (if db-based? "database" "folder")) {:size 16})]
+      [:span.thumb (shui/tabler-icon (if remote? "cloud" (if db-based? "topology-star" "folder")) {:size 16})]
       [:strong short-repo-name]
       (shui/tabler-icon "selector" {:size 18})]]))