mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 14:09:17 +00:00
🐛 Fix subpath support on plugins
This commit is contained in:
parent
1fff1f9506
commit
ae0f5e2bb9
@ -10,6 +10,7 @@
|
|||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.schema :as sm]
|
[app.common.schema :as sm]
|
||||||
[app.common.types.plugins :as ctp]
|
[app.common.types.plugins :as ctp]
|
||||||
|
[app.common.uri :as u]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
@ -50,7 +51,13 @@
|
|||||||
(contains? permissions "comment:write")
|
(contains? permissions "comment:write")
|
||||||
(conj "comment:read"))
|
(conj "comment:read"))
|
||||||
|
|
||||||
origin (obj/get (js/URL. plugin-url) "origin")
|
plugin-url
|
||||||
|
(u/uri plugin-url)
|
||||||
|
|
||||||
|
origin
|
||||||
|
(-> plugin-url
|
||||||
|
(u/join ".")
|
||||||
|
(str))
|
||||||
|
|
||||||
prev-plugin
|
prev-plugin
|
||||||
(->> (:data @registry)
|
(->> (:data @registry)
|
||||||
@ -59,12 +66,13 @@
|
|||||||
(and (= name (:name plugin))
|
(and (= name (:name plugin))
|
||||||
(= origin (:host plugin))))))
|
(= origin (:host plugin))))))
|
||||||
|
|
||||||
plugin-id (d/nilv (:plugin-id prev-plugin) (str (uuid/next)))
|
plugin-id
|
||||||
|
(d/nilv (:plugin-id prev-plugin) (str (uuid/next)))
|
||||||
|
|
||||||
manifest
|
manifest
|
||||||
(d/without-nils
|
(d/without-nils
|
||||||
{:plugin-id plugin-id
|
{:plugin-id plugin-id
|
||||||
:url plugin-url
|
:url (str plugin-url)
|
||||||
:name name
|
:name name
|
||||||
:description desc
|
:description desc
|
||||||
:host origin
|
:host origin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user