mirror of
https://github.com/penpot/penpot.git
synced 2025-07-16 18:05:18 +02:00
✨ Add missing start-plugin event (#6809)
* ✨ Add missing start-plugin event * 📎 Correct event origin
This commit is contained in:
parent
898182e3d5
commit
95f4a9bd29
1 changed files with 8 additions and 2 deletions
|
@ -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]}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue