浏览代码

fix: lint issues

Peng Xiao 3 年之前
父节点
当前提交
564e2fe1b4

+ 0 - 4
src/main/frontend/components/block.cljs

@@ -103,10 +103,6 @@
 ;; TODO:
 ;; add `key`
 
-(defn get-dragging-block
-  []
-  @*dragging-block)
-
 (defn- remove-nils
   [col]
   (remove nil? col))

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

@@ -28,8 +28,7 @@
             [reitit.frontend.easy :as rfe]
             [rum.core :as rum]
             [frontend.mobile.util :as mobile-util]
-            [frontend.db :as db]
-            [frontend.handler.user :as user]))
+            [frontend.db :as db]))
 
 (defn toggle
   [label-for name state on-toggle & [detail-text]]

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

@@ -6,7 +6,6 @@
             [frontend.context.i18n :refer [t]]
             [frontend.db.model :as model]
             [frontend.handler.route :as route-handler]
-            [frontend.handler.route :as route]
             [frontend.handler.user :as user-handler]
             [frontend.handler.whiteboard :as whiteboard-handler]
             [frontend.state :as state]
@@ -188,7 +187,7 @@
                                  (map (fn [name]
                                         (some (fn [w] (when (= (:block/name w) name) w)) whiteboards))
                                       checked-page-names)
-                                 false route/redirect-to-whiteboard-dashboard!)))}
+                                 false route-handler/redirect-to-whiteboard-dashboard!)))}
            [:span.flex.gap-2.items-center
             [:span.opacity-50 (ui/icon "trash" {:style {:font-size 15}})]
             (t :delete)

+ 18 - 23
src/main/frontend/handler/whiteboard.cljs

@@ -2,7 +2,6 @@
   (:require [datascript.core :as d]
             [frontend.db.model :as model]
             [frontend.db.utils :as db-utils]
-            [frontend.handler.editor :as editor-handler]
             [frontend.modules.outliner.core :as outliner]
             [frontend.modules.outliner.file :as outliner-file]
             [frontend.state :as state]
@@ -33,10 +32,6 @@
   []
   js/window.tln)
 
-(defn get-tldr-api
-  []
-  (when (get-tldr-app) js/tln.api))
-
 (defn tldraw-idle?
   "return true when tldraw is active and idle. nil when tldraw is 
    not active."
@@ -163,24 +158,24 @@
        (create-new-whiteboard-page! page-name))
      (create-new-whiteboard-page! nil))))
 
-(defn ->logseq-portal-shape
-  [block-id point]
-  {:blockType "B"
-   :id (str (d/squuid))
-   :compact true
-   :pageId (str block-id)
-   :point point
-   :size [400, 0]
-   :type "logseq-portal"})
-
-(defn add-new-block-portal-shape!
-  "Given the block uuid and the point, add a new shape to the referenced block."
-  [block-uuid client-x client-y]
-  (let [api (get-tldr-api)
-        point (js->clj (.. (get-tldr-app) -viewport (getPagePoint #js[client-x client-y])))
-        shape (->logseq-portal-shape block-uuid point)]
-    (editor-handler/set-blocks-id! [block-uuid])
-    (.createShapes api (clj->js shape))))
+;; (defn ->logseq-portal-shape
+;;   [block-id point]
+;;   {:blockType "B"
+;;    :id (str (d/squuid))
+;;    :compact true
+;;    :pageId (str block-id)
+;;    :point point
+;;    :size [400, 0]
+;;    :type "logseq-portal"})
+
+;; (defn add-new-block-portal-shape!
+;;   "Given the block uuid and the point, add a new shape to the referenced block."
+;;   [block-uuid client-x client-y]
+;;   (let [api (get-tldr-api)
+;;         point (js->clj (.. (get-tldr-app) -viewport (getPagePoint #js[client-x client-y])))
+;;         shape (->logseq-portal-shape block-uuid point)]
+;;     (editor-handler/set-blocks-id! [block-uuid])
+;;     (.createShapes api (clj->js shape))))
 
 (defn- get-whiteboard-blocks
   "Given a page, return all the logseq blocks (exlude all shapes)"