fix(sidebar): #1281

This commit is contained in:
charlie
2021-02-08 11:51:59 +08:00
committed by Tienson Qin
parent fb15b4beab
commit 4875e5b367
2 changed files with 11 additions and 11 deletions

View File

@@ -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)]

View File

@@ -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]