enhance(plugins): simplify state for the installed web plugins

This commit is contained in:
charlie
2024-12-26 15:43:33 +08:00
parent 37dbfae45f
commit d3b68f1ff7
3 changed files with 65 additions and 66 deletions

View File

@@ -830,8 +830,9 @@
(swap! state/state assoc :plugin/installed-themes
(vec (mapcat (fn [[pid vs]] (mapv #(assoc % :pid pid) (bean/->clj vs))) (bean/->clj themes))))))
(.on "theme-selected" (fn [^js theme]
(.on "theme-selected" (fn [^js theme ^js opts]
(let [theme (bean/->clj theme)
_opts (bean/->clj opts)
url (:url theme)
mode (:mode theme)]
(when mode