Gabriel Horner hai 1 ano
pai
achega
6b9673398e

+ 9 - 9
src/electron/electron/state.cljs

@@ -40,15 +40,15 @@
   []
   (set (vals (:window/graph @state))))
 
-(defn get-active-window-graph-path
-  "Get the path of the graph of the currently focused window (might be `nil`)"
-  []
-  (let [windows (:window/graph @state)
-        active-windows-pairs (filter #(.isFocused (first %)) windows)
-        active-window-pair (first active-windows-pairs)
-        path (second active-window-pair)]
-    path)
-  )
+;; Disabled until FIXME in electron.core is addressed
+#_(defn get-active-window-graph-path
+    "Get the path of the graph of the currently focused window (might be `nil`)"
+    []
+    (let [windows (:window/graph @state)
+          active-windows-pairs (filter #(.isFocused (first %)) windows)
+          active-window-pair (first active-windows-pairs)
+          path (second active-window-pair)]
+      path))
 
 (defn close-window!
   [window]

+ 9 - 11
src/main/frontend/components/icon.cljs

@@ -162,7 +162,7 @@
   (rum/local nil ::result)
   (rum/local :all ::tab)
   (rum/local nil ::hover)
-  [state opts]
+  [state {:keys [on-chosen] :as opts}]
   (let [*q (::q state)
         *result (::result state)
         *tab (::tab state)
@@ -170,20 +170,18 @@
         *input-ref (rum/create-ref)
         *result-ref (rum/create-ref)
         result @*result
-        opts (assoc opts :hover *hover)
-        on-chosen' (:on-chosen opts)
-        opts (assoc opts
-               :on-chosen (fn [e m]
-                            (and on-chosen' (on-chosen' e m))
-                            (when (:type m) (add-used-item! m))))
+        opts (assoc opts :hover *hover
+                    :on-chosen (fn [e m]
+                                 (and on-chosen (on-chosen e m))
+                                 (when (:type m) (add-used-item! m))))
         reset-q! #(when-let [^js input (rum/deref *input-ref)]
                     (reset! *q "")
                     (reset! *result {})
                     (set! (. input -value) "")
                     (js/setTimeout
-                      (fn [] (.focus input)
-                        (util/scroll-to (rum/deref *result-ref) 0 false))
-                      64))]
+                     (fn [] (.focus input)
+                       (util/scroll-to (rum/deref *result-ref) 0 false))
+                     64))]
     [:div.cp__emoji-icon-picker
      ;; header
      [:div.hd
@@ -200,7 +198,7 @@
                           ;; esc
                           27 (do (util/stop e)
                                  (if (string/blank? @*q)
-                                   (some-> (rum/deref *input-ref) (.blur))
+                                    (some-> (rum/deref *input-ref) (.blur))
                                    (reset-q!)))
                           ;; up
                           38 (do (util/stop e))

+ 1 - 1
src/main/frontend/ui.cljs

@@ -1051,7 +1051,7 @@
                       :muted   disabled?}
                 button-props)
 
-        icon (when icon (shui-ui/tabler-icon icon icon-props))
+        icon (when icon (shui/tabler-icon icon icon-props))
         href? (not (string/blank? href))
         text (cond
                href? [:a {:href href :target "_blank"