diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-10 11:27:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-10 11:36:40 +0100 |
commit | 70e335158499b0ac9e6da2193219d87512759876 (patch) | |
tree | a46c8f5a19592f93afc3a48996e55bfaa362f2ed /client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | |
parent | 5f46d28ccac4a20fcbb12c96a047a84a08e485ae (diff) | |
download | PeerTube-70e335158499b0ac9e6da2193219d87512759876.tar.gz PeerTube-70e335158499b0ac9e6da2193219d87512759876.tar.zst PeerTube-70e335158499b0ac9e6da2193219d87512759876.zip |
Small edit config refactor
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts index a82a40a84..3328d28a9 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | |||
@@ -42,7 +42,13 @@ export class EditLiveConfigurationComponent implements OnInit { | |||
42 | getAvailableTranscodingProfile () { | 42 | getAvailableTranscodingProfile () { |
43 | const profiles = this.serverConfig.live.transcoding.availableProfiles | 43 | const profiles = this.serverConfig.live.transcoding.availableProfiles |
44 | 44 | ||
45 | return profiles.map(p => ({ id: p, label: p })) | 45 | return profiles.map(p => { |
46 | const description = p === 'default' | ||
47 | ? $localize`x264, targeting maximum device compatibility` | ||
48 | : '' | ||
49 | |||
50 | return { id: p, label: p, description } | ||
51 | }) | ||
46 | } | 52 | } |
47 | 53 | ||
48 | getResolutionKey (resolution: string) { | 54 | getResolutionKey (resolution: string) { |
@@ -57,6 +63,14 @@ export class EditLiveConfigurationComponent implements OnInit { | |||
57 | return this.editConfigurationService.isLiveEnabled(this.form) | 63 | return this.editConfigurationService.isLiveEnabled(this.form) |
58 | } | 64 | } |
59 | 65 | ||
66 | getDisabledLiveClass () { | ||
67 | return { 'disabled-checkbox-extra': !this.isLiveEnabled() } | ||
68 | } | ||
69 | |||
70 | getDisabledLiveTranscodingClass () { | ||
71 | return { 'disabled-checkbox-extra': !this.isLiveEnabled() || !this.isLiveTranscodingEnabled() } | ||
72 | } | ||
73 | |||
60 | isLiveTranscodingEnabled () { | 74 | isLiveTranscodingEnabled () { |
61 | return this.editConfigurationService.isLiveTranscodingEnabled(this.form) | 75 | return this.editConfigurationService.isLiveTranscodingEnabled(this.form) |
62 | } | 76 | } |