aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-instance
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-10-28 15:24:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commita056ca4813c82f490dcd31ac97a64d6bf76d3dcc (patch)
tree11a0638cb92eee94f404e294f54632212836a4a6 /client/src/app/shared/shared-instance
parentd846d99c6c81028bb7bd3cb20abd433cbf396a22 (diff)
downloadPeerTube-a056ca4813c82f490dcd31ac97a64d6bf76d3dcc.tar.gz
PeerTube-a056ca4813c82f490dcd31ac97a64d6bf76d3dcc.tar.zst
PeerTube-a056ca4813c82f490dcd31ac97a64d6bf76d3dcc.zip
Add max lives limit
Diffstat (limited to 'client/src/app/shared/shared-instance')
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.html7
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.ts14
2 files changed, 21 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.html b/client/src/app/shared/shared-instance/instance-features-table.component.html
index 002695238..ce2557147 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.html
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.html
@@ -82,6 +82,13 @@
82 </tr> 82 </tr>
83 83
84 <tr> 84 <tr>
85 <th i18n class="sub-label" scope="row">Max parallel lives</th>
86 <td i18n>
87 {{ maxUserLives }} per user / {{ maxInstanceLives }} per instance
88 </td>
89 </tr>
90
91 <tr>
85 <th i18n class="label" colspan="2">Import</th> 92 <th i18n class="label" colspan="2">Import</th>
86 </tr> 93 </tr>
87 94
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index 76b595c20..0166157f9 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -21,6 +21,20 @@ export class InstanceFeaturesTableComponent implements OnInit {
21 return Math.min(this.initialUserVideoQuota, this.serverConfig.user.videoQuotaDaily) 21 return Math.min(this.initialUserVideoQuota, this.serverConfig.user.videoQuotaDaily)
22 } 22 }
23 23
24 get maxInstanceLives () {
25 const value = this.serverConfig.live.maxInstanceLives
26 if (value === -1) return $localize`Unlimited`
27
28 return value
29 }
30
31 get maxUserLives () {
32 const value = this.serverConfig.live.maxUserLives
33 if (value === -1) return $localize`Unlimited`
34
35 return value
36 }
37
24 ngOnInit () { 38 ngOnInit () {
25 this.serverConfig = this.serverService.getTmpConfig() 39 this.serverConfig = this.serverService.getTmpConfig()
26 this.serverService.getConfig() 40 this.serverService.getConfig()