mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +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.schema :as sm]
|
||||
[app.common.types.plugins :as ctp]
|
||||
[app.common.uri :as u]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.main.repo :as rp]
|
||||
[app.main.store :as st]
|
||||
@ -50,7 +51,13 @@
|
||||
(contains? permissions "comment:write")
|
||||
(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
|
||||
(->> (:data @registry)
|
||||
@ -59,12 +66,13 @@
|
||||
(and (= name (:name 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
|
||||
(d/without-nils
|
||||
{:plugin-id plugin-id
|
||||
:url plugin-url
|
||||
:url (str plugin-url)
|
||||
:name name
|
||||
:description desc
|
||||
:host origin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user