diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-29 14:44:58 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-29 14:44:58 +0100 |
commit | 0628157fe9662fdb2b6fa658b8b53fe684c013ce (patch) | |
tree | 52bf9dc16d9e30cb716a6df76ce12fd7d34cff7f /client/src | |
parent | fb3c9e2bf5b45d6d283cea4d55cc0d49eb58e3cb (diff) | |
download | PeerTube-0628157fe9662fdb2b6fa658b8b53fe684c013ce.tar.gz PeerTube-0628157fe9662fdb2b6fa658b8b53fe684c013ce.tar.zst PeerTube-0628157fe9662fdb2b6fa658b8b53fe684c013ce.zip |
Move uuid stuff in extra utils
Since it requires an external dependency
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 3 | ||||
-rw-r--r-- | client/src/app/shared/shared-forms/dynamic-form-field.component.html | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index bb9125fe1..dadc2a41d 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -11,6 +11,7 @@ import { ServerService } from '@app/core/server/server.service' | |||
11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' | 11 | import { getDevLocale, isOnDevLocale } from '@app/helpers' |
12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' | 12 | import { CustomModalComponent } from '@app/modal/custom-modal.component' |
13 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' | 13 | import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' |
14 | import { getKeys } from '@shared/core-utils' | ||
14 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' | 15 | import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n' |
15 | import { | 16 | import { |
16 | ClientHook, | 17 | ClientHook, |
@@ -134,7 +135,7 @@ export class PluginService implements ClientHook { | |||
134 | } | 135 | } |
135 | 136 | ||
136 | async translateSetting (npmName: string, setting: RegisterClientFormFieldOptions) { | 137 | async translateSetting (npmName: string, setting: RegisterClientFormFieldOptions) { |
137 | for (const key of [ 'label', 'html', 'descriptionHTML' ]) { | 138 | for (const key of getKeys(setting, [ 'label', 'html', 'descriptionHTML' ])) { |
138 | if (setting[key]) setting[key] = await this.translateBy(npmName, setting[key]) | 139 | if (setting[key]) setting[key] = await this.translateBy(npmName, setting[key]) |
139 | } | 140 | } |
140 | 141 | ||
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.html b/client/src/app/shared/shared-forms/dynamic-form-field.component.html index c228069b5..2ef61ecfc 100644 --- a/client/src/app/shared/shared-forms/dynamic-form-field.component.html +++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <div [formGroup]="form"> | 1 | <div *ngIf="form" [formGroup]="form"> |
2 | <label *ngIf="setting.label && setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> | 2 | <label *ngIf="setting.label && setting.type !== 'input-checkbox'" [attr.for]="setting.name" [innerHTML]="setting.label"></label> |
3 | 3 | ||
4 | <my-peertube-checkbox | 4 | <my-peertube-checkbox |