enhance: put warning above the plugins

This commit is contained in:
Tienson Qin
2021-06-17 21:05:03 +08:00
parent 777437a999
commit effae4b9d6

View File

@@ -133,6 +133,11 @@
selected-unpacked-pkg (state/sub :plugin/selected-unpacked-pkg)]
[:div.cp__plugins-page-installed
[:h1 "Installed Plugins"]
(ui/admonition
:warning
[:div {:style {:max-width 700}}
"Plugins can access your graph and your local files, issue network requests. They can also cause data corruption or loss. We're working on proper access rules for your graphs. Meanwhile, make sure you have regular backups of your graphs and only install the plugins when you can read and understand the source code."])
[:hr]
[:div.mb-6.flex.items-center.justify-between
(ui/button
"Load unpacked plugin"
@@ -151,11 +156,7 @@
[:div.cp__plugins-item-lists.grid-cols-1.md:grid-cols-2.lg:grid-cols-3
(for [[_ item] installed-plugins]
(rum/with-key (plugin-item-card item) (:id item)))]
(ui/admonition
:warning
[:div "Plugins can access your graph and your local files, issue network requests. They can also cause data corruption or loss. We're working on proper access rules for your graphs. Meanwhile, make sure you have regular backups of your graphs and only install the plugins when you can read and understand the source code."])]))
(rum/with-key (plugin-item-card item) (:id item)))]]))
(defn open-select-theme!
[]