mirror of
https://github.com/logseq/logseq.git
synced 2026-05-27 14:14:24 +00:00
fix(sidebar): #1281
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
(vec (cons {:path (fix-win-path! path)} result))))
|
||||
|
||||
;; TODO: Is it going to be slow if it's a huge directory
|
||||
(defmethod handle :openDir [window _messages]
|
||||
(defmethod handle :openDir [^js window _messages]
|
||||
(let [result (.showOpenDialogSync dialog (bean/->js
|
||||
{:properties ["openDirectory"]}))
|
||||
path (first result)]
|
||||
|
||||
@@ -399,20 +399,20 @@
|
||||
:behavior "smooth"}))))))
|
||||
|
||||
#?(:cljs
|
||||
(defn scroll-to
|
||||
([pos]
|
||||
(scroll-to pos true))
|
||||
([pos animate?]
|
||||
(scroll-to (app-scroll-container-node) pos animate?))
|
||||
([node pos animate?]
|
||||
(.scroll node
|
||||
#js {:top pos
|
||||
:behavior (if animate? "smooth" "auto")}))))
|
||||
(defn scroll-to
|
||||
([pos]
|
||||
(scroll-to (app-scroll-container-node) pos))
|
||||
([node pos]
|
||||
(scroll-to node pos true))
|
||||
([node pos animate?]
|
||||
(.scroll node
|
||||
#js {:top pos
|
||||
:behavior (if animate? "smooth" "auto")}))))
|
||||
|
||||
#?(:cljs
|
||||
(defn scroll-to-top
|
||||
[]
|
||||
(scroll-to 0 false)))
|
||||
(scroll-to (app-scroll-container-node) 0 false)))
|
||||
|
||||
(defn url-encode
|
||||
[string]
|
||||
|
||||
Reference in New Issue
Block a user