Add missing start-plugin event (#6809)

*  Add missing start-plugin event

* 📎 Correct event origin
This commit is contained in:
María Valderrama 2025-07-03 10:29:43 +02:00 committed by GitHub
parent 898182e3d5
commit 95f4a9bd29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,6 +9,7 @@
[app.common.data.macros :as dm]
[app.common.files.changes-builder :as pcb]
[app.main.data.changes :as dch]
[app.main.data.event :as ev]
[app.main.data.modal :as modal]
[app.main.data.notifications :as ntf]
[app.main.store :as st]
@ -144,8 +145,13 @@
(watch [_ state _]
(let [user-can-edit? (dm/get-in state [:permissions :can-edit])]
(when-let [pid (::open-plugin state)]
(open-plugin! (preg/get-plugin pid) user-can-edit?)
(rx/of #(dissoc % ::open-plugin)))))))
(let [plugin (preg/get-plugin pid)]
(open-plugin! plugin user-can-edit?)
(rx/of (ev/event {::ev/name "start-plugin"
::ev/origin "workspace"
:name (:name plugin)
:host (:host plugin)})
#(dissoc % ::open-plugin))))))))
(defn- update-plugin-permissions-peek
[{:keys [plugin-id url]}]