aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts4
-rw-r--r--client/src/app/+admin/plugins/shared/plugin-api.service.ts4
-rw-r--r--client/src/app/core/plugins/plugin.service.ts6
3 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
index 0fbd65160..569d98482 100644
--- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
@@ -6,8 +6,8 @@ import { Notifier } from '@app/core'
6import { ActivatedRoute } from '@angular/router' 6import { ActivatedRoute } from '@angular/router'
7import { Subscription } from 'rxjs' 7import { Subscription } from 'rxjs'
8import { map, switchMap } from 'rxjs/operators' 8import { map, switchMap } from 'rxjs/operators'
9import { RegisterSettingOptions } from '@shared/models/plugins/register-setting.model'
10import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared' 9import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared'
10import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model'
11 11
12@Component({ 12@Component({
13 selector: 'my-plugin-show-installed', 13 selector: 'my-plugin-show-installed',
@@ -16,7 +16,7 @@ import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shar
16}) 16})
17export class PluginShowInstalledComponent extends FormReactive implements OnInit, OnDestroy { 17export class PluginShowInstalledComponent extends FormReactive implements OnInit, OnDestroy {
18 plugin: PeerTubePlugin 18 plugin: PeerTubePlugin
19 registeredSettings: RegisterSettingOptions[] = [] 19 registeredSettings: RegisterServerSettingOptions[] = []
20 pluginTypeLabel: string 20 pluginTypeLabel: string
21 21
22 private sub: Subscription 22 private sub: Subscription
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
index 51f086a93..bfcaec011 100644
--- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts
+++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
@@ -10,8 +10,8 @@ import { ResultList } from '@shared/models'
10import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' 10import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model'
11import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model' 11import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model'
12import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model' 12import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model'
13import { RegisterSettingOptions } from '@shared/models/plugins/register-setting.model'
14import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' 13import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model'
14import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model'
15 15
16@Injectable() 16@Injectable()
17export class PluginApiService { 17export class PluginApiService {
@@ -88,7 +88,7 @@ export class PluginApiService {
88 getPluginRegisteredSettings (pluginName: string, pluginType: PluginType) { 88 getPluginRegisteredSettings (pluginName: string, pluginType: PluginType) {
89 const path = PluginApiService.BASE_APPLICATION_URL + '/' + this.nameToNpmName(pluginName, pluginType) + '/registered-settings' 89 const path = PluginApiService.BASE_APPLICATION_URL + '/' + this.nameToNpmName(pluginName, pluginType) + '/registered-settings'
90 90
91 return this.authHttp.get<{ settings: RegisterSettingOptions[] }>(path) 91 return this.authHttp.get<{ settings: RegisterServerSettingOptions[] }>(path)
92 .pipe(catchError(res => this.restExtractor.handleError(res))) 92 .pipe(catchError(res => this.restExtractor.handleError(res)))
93 } 93 }
94 94
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index 5d180e5a0..e4a73de81 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -4,14 +4,14 @@ import { ServerConfigPlugin } from '@shared/models'
4import { ServerService } from '@app/core/server/server.service' 4import { ServerService } from '@app/core/server/server.service'
5import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' 5import { ClientScript } from '@shared/models/plugins/plugin-package-json.model'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { RegisterHookOptions } from '@shared/models/plugins/register-hook.model'
8import { ReplaySubject } from 'rxjs' 7import { ReplaySubject } from 'rxjs'
9import { first, shareReplay } from 'rxjs/operators' 8import { first, shareReplay } from 'rxjs/operators'
10import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' 9import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks'
11import { ClientHook, ClientHookName, clientHookObject } from '@shared/models/plugins/client-hook.model' 10import { ClientHook, ClientHookName, clientHookObject } from '@shared/models/plugins/client-hook.model'
12import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type' 11import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type'
12import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
13 13
14interface HookStructValue extends RegisterHookOptions { 14interface HookStructValue extends RegisterClientHookOptions {
15 plugin: ServerConfigPlugin 15 plugin: ServerConfigPlugin
16 clientScript: ClientScript 16 clientScript: ClientScript
17} 17}
@@ -164,7 +164,7 @@ export class PluginService implements ClientHook {
164 private loadPlugin (pluginInfo: PluginInfo) { 164 private loadPlugin (pluginInfo: PluginInfo) {
165 const { plugin, clientScript } = pluginInfo 165 const { plugin, clientScript } = pluginInfo
166 166
167 const registerHook = (options: RegisterHookOptions) => { 167 const registerHook = (options: RegisterClientHookOptions) => {
168 if (clientHookObject[options.target] !== true) { 168 if (clientHookObject[options.target] !== true) {
169 console.error('Unknown hook %s of plugin %s. Skipping.', options.target, plugin.name) 169 console.error('Unknown hook %s of plugin %s. Skipping.', options.target, plugin.name)
170 return 170 return