diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index 86bde2d02..c6ba3dd17 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -48,7 +48,9 @@ export class PluginService { | |||
48 | .toPromise() | 48 | .toPromise() |
49 | } | 49 | } |
50 | 50 | ||
51 | addPlugin (plugin: ServerConfigPlugin) { | 51 | addPlugin (plugin: ServerConfigPlugin, isTheme = false) { |
52 | const pathPrefix = isTheme ? '/themes' : '/plugins' | ||
53 | |||
52 | for (const key of Object.keys(plugin.clientScripts)) { | 54 | for (const key of Object.keys(plugin.clientScripts)) { |
53 | const clientScript = plugin.clientScripts[key] | 55 | const clientScript = plugin.clientScripts[key] |
54 | 56 | ||
@@ -58,7 +60,7 @@ export class PluginService { | |||
58 | this.scopes[scope].push({ | 60 | this.scopes[scope].push({ |
59 | plugin, | 61 | plugin, |
60 | clientScript: { | 62 | clientScript: { |
61 | script: environment.apiUrl + `/plugins/${plugin.name}/${plugin.version}/client-scripts/${clientScript.script}`, | 63 | script: environment.apiUrl + `${pathPrefix}/${plugin.name}/${plugin.version}/client-scripts/${clientScript.script}`, |
62 | scopes: clientScript.scopes | 64 | scopes: clientScript.scopes |
63 | } | 65 | } |
64 | }) | 66 | }) |