From 9ae88819c202a6ce4a36b56506f508a5603e8eab Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Jul 2019 11:17:42 +0200 Subject: Change plugin models names --- .../plugin-show-installed/plugin-show-installed.component.ts | 4 ++-- client/src/app/+admin/plugins/shared/plugin-api.service.ts | 4 ++-- client/src/app/core/plugins/plugin.service.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'client/src') 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' import { ActivatedRoute } from '@angular/router' import { Subscription } from 'rxjs' import { map, switchMap } from 'rxjs/operators' -import { RegisterSettingOptions } from '@shared/models/plugins/register-setting.model' import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shared' +import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' @Component({ selector: 'my-plugin-show-installed', @@ -16,7 +16,7 @@ import { BuildFormArgument, FormReactive, FormValidatorService } from '@app/shar }) export class PluginShowInstalledComponent extends FormReactive implements OnInit, OnDestroy { plugin: PeerTubePlugin - registeredSettings: RegisterSettingOptions[] = [] + registeredSettings: RegisterServerSettingOptions[] = [] pluginTypeLabel: string 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' import { PeerTubePlugin } from '@shared/models/plugins/peertube-plugin.model' import { ManagePlugin } from '@shared/models/plugins/manage-plugin.model' import { InstallOrUpdatePlugin } from '@shared/models/plugins/install-plugin.model' -import { RegisterSettingOptions } from '@shared/models/plugins/register-setting.model' import { PeerTubePluginIndex } from '@shared/models/plugins/peertube-plugin-index.model' +import { RegisterServerSettingOptions } from '@shared/models/plugins/register-server-setting.model' @Injectable() export class PluginApiService { @@ -88,7 +88,7 @@ export class PluginApiService { getPluginRegisteredSettings (pluginName: string, pluginType: PluginType) { const path = PluginApiService.BASE_APPLICATION_URL + '/' + this.nameToNpmName(pluginName, pluginType) + '/registered-settings' - return this.authHttp.get<{ settings: RegisterSettingOptions[] }>(path) + return this.authHttp.get<{ settings: RegisterServerSettingOptions[] }>(path) .pipe(catchError(res => this.restExtractor.handleError(res))) } 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' import { ServerService } from '@app/core/server/server.service' import { ClientScript } from '@shared/models/plugins/plugin-package-json.model' import { environment } from '../../../environments/environment' -import { RegisterHookOptions } from '@shared/models/plugins/register-hook.model' import { ReplaySubject } from 'rxjs' import { first, shareReplay } from 'rxjs/operators' import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' import { ClientHook, ClientHookName, clientHookObject } from '@shared/models/plugins/client-hook.model' import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type' +import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model' -interface HookStructValue extends RegisterHookOptions { +interface HookStructValue extends RegisterClientHookOptions { plugin: ServerConfigPlugin clientScript: ClientScript } @@ -164,7 +164,7 @@ export class PluginService implements ClientHook { private loadPlugin (pluginInfo: PluginInfo) { const { plugin, clientScript } = pluginInfo - const registerHook = (options: RegisterHookOptions) => { + const registerHook = (options: RegisterClientHookOptions) => { if (clientHookObject[options.target] !== true) { console.error('Unknown hook %s of plugin %s. Skipping.', options.target, plugin.name) return -- cgit v1.2.3