浏览代码

Add yarn dev

Tienson Qin 5 月之前
父节点
当前提交
87beb7fdaf
共有 3 个文件被更改,包括 5 次插入11 次删除
  1. 2 0
      package.json
  2. 1 6
      src/main/capacitor/components/search.cljs
  3. 2 5
      src/main/frontend/components/cmdk/core.cljs

+ 2 - 0
package.json

@@ -48,6 +48,7 @@
         "watch": "run-p gulp:watch cljs:watch",
         "electron-watch": "run-p gulp:watch cljs:electron-watch",
         "app-watch": "run-p gulp:watch cljs:app-watch",
+        "dev": "run-p gulp:watch gulp:capacitor-new-watch cljs:dev-watch",
         "release": "run-s gulp:build cljs:release",
         "release-app": "run-s gulp:build cljs:release-app",
         "dev-release-app": "run-s gulp:build cljs:dev-release-app",
@@ -71,6 +72,7 @@
         "css:capacitor-new-build": "postcss tailwind.capacitor.css -o static/style.css --verbose --env production",
         "css:capacitor-new-watch": "cross-env TAILWIND_MODE=watch postcss tailwind.capacitor.css -o static/capacitor/style.css --verbose --watch",
         "cljs:capacitor-new-watch": "clojure -M:cljs watch capacitor-new",
+        "cljs:dev-watch": "clojure -M:cljs watch app electron capacitor-new",
         "cljs:app-watch": "clojure -M:cljs watch app",
         "cljs:electron-watch": "clojure -M:cljs watch app electron --config-merge \"{:asset-path \\\"./js\\\"}\"",
         "cljs:release": "clojure -M:cljs release app publishing electron",

+ 1 - 6
src/main/capacitor/components/search.cljs

@@ -26,11 +26,6 @@
                           (cmdk/block-item repo block nil input))) blocks)]
     items))
 
-(rum/defc result-item
-  [item]
-  [:div.flex.flex-1
-   (:text item)])
-
 (rum/defc search
   []
   (let [*ref (hooks/use-ref nil)
@@ -61,7 +56,7 @@
              (when header
                [:div.opacity-50.text-sm
                 header])
-             [:div.flex.flex-row.items-center.gap-2
+             [:div.flex.flex-row.items-center.gap-1
               (when icon (ui/icon icon {:size 14
                                         :class "text-muted-foreground"}))
               [:div text]]]))))))))

+ 2 - 5
src/main/frontend/components/cmdk/core.cljs

@@ -287,11 +287,8 @@
 (defn block-item
   [repo block current-page input]
   (let [id (:block/uuid block)
-        text (block-handler/block-unique-title block)
-        icon "letter-n"]
-    {:icon icon
-     :icon-theme :gray
-     :text (highlight-content-query text input)
+        text (block-handler/block-unique-title block)]
+    {:text (highlight-content-query text input)
      :header (when-not (db/page? block) (block/breadcrumb {:search? true} repo id {}))
      :current-page? (when-let [page-id (:block/page block)]
                       (= page-id (:block/uuid current-page)))