From 428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 May 2021 12:04:47 +0200 Subject: Reorganize plugin models --- client/src/root-helpers/plugins.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/root-helpers') diff --git a/client/src/root-helpers/plugins.ts b/client/src/root-helpers/plugins.ts index 5344c0468..8c1c858b7 100644 --- a/client/src/root-helpers/plugins.ts +++ b/client/src/root-helpers/plugins.ts @@ -1,14 +1,15 @@ import { RegisterClientHelpers } from 'src/types/register-client-option.model' import { getHookType, internalRunHook } from '@shared/core-utils/plugins/hooks' -import { RegisterClientFormFieldOptions, RegisterClientVideoFieldOptions } from '@shared/models/plugins/register-client-form-field.model' import { ClientHookName, clientHookObject, ClientScript, PluginType, + RegisterClientFormFieldOptions, RegisterClientHookOptions, - ServerConfigPlugin, - RegisterClientSettingsScript + RegisterClientSettingsScript, + RegisterClientVideoFieldOptions, + ServerConfigPlugin } from '../../../shared/models' import { ClientScript as ClientScriptModule } from '../types/client-script.model' import { importModule } from './utils' -- cgit v1.2.3 From 0f01a8bacddf6c502e6470e34fdac7750bb76e89 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 14 May 2021 16:12:45 +0200 Subject: Remove ngx-meta Unmaintained --- client/src/root-helpers/peertube-web-storage.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'client/src/root-helpers') diff --git a/client/src/root-helpers/peertube-web-storage.ts b/client/src/root-helpers/peertube-web-storage.ts index f29845443..d4cad8a20 100644 --- a/client/src/root-helpers/peertube-web-storage.ts +++ b/client/src/root-helpers/peertube-web-storage.ts @@ -4,17 +4,19 @@ const valuesMap = new Map() function proxify (instance: MemoryStorage) { return new Proxy(instance, { - set: function (obj, prop: string | number, value) { + set: function (obj, prop: string | symbol, value) { if (MemoryStorage.prototype.hasOwnProperty(prop)) { - instance[prop] = value + // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 + instance[prop as any] = value } else { instance.setItem(prop, value) } return true }, - get: function (target, name: string | number) { + get: function (target, name: string | symbol | number) { if (MemoryStorage.prototype.hasOwnProperty(name)) { - return instance[name] + // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 + return instance[name as any] } if (valuesMap.has(name)) { return instance.getItem(name) @@ -23,9 +25,8 @@ function proxify (instance: MemoryStorage) { }) } -class MemoryStorage { +class MemoryStorage implements Storage { [key: string]: any - [index: number]: string getItem (key: any) { const stringKey = String(key) -- cgit v1.2.3