diff --git a/client/src/app/+about/about-peertube/about-peertube.component.html b/client/src/app/+about/about-peertube/about-peertube.component.html
index 55ac344f9..13ce89f75 100644
--- a/client/src/app/+about/about-peertube/about-peertube.component.html
+++ b/client/src/app/+about/about-peertube/about-peertube.component.html
@@ -1,6 +1,6 @@
-
-
P2P & Privacy
+
P2P & Privacy
PeerTube uses the BitTorrent protocol to share bandwidth between users.
This implies that your IP address is stored in the instance's BitTorrent tracker as long as you download or watch the video.
-
What are the consequences?
+
What are the consequences?
In theory, someone with enough technical skills could create a script that tracks which IP is downloading which video.
@@ -64,7 +64,7 @@
There are much more effective ways to get that kind of information.
-
How does PeerTube compare with YouTube?
+
How does PeerTube compare with YouTube?
The threats to privacy in YouTube are different from PeerTube's.
@@ -72,7 +72,7 @@
Moreover, YouTube is owned by Google/Alphabet, a company that tracks you across many websites (via AdSense or Google Analytics).
-
What can I do to limit the exposure of my IP address?
+
What can I do to limit the exposure of my IP address?
Your IP address is public so every time you consult a website, there is a number of actors (in addition to the final website) seeing your IP in their connection logs: ISP/routers/trackers/CDN and more.
@@ -80,7 +80,7 @@
Thinking that removing P2P from PeerTube will give you back anonymity doesn't make sense.
-
What will be done to mitigate this problem?
+
What will be done to mitigate this problem?
PeerTube is only in beta, and want to deliver the best countermeasures possible by the time the stable is released.
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.scss b/client/src/app/+about/about-peertube/about-peertube.component.scss
index 1d8579ec1..0d2e2bb68 100644
--- a/client/src/app/+about/about-peertube/about-peertube.component.scss
+++ b/client/src/app/+about/about-peertube/about-peertube.component.scss
@@ -2,7 +2,7 @@
@import '_mixins';
.about-peertube-title {
- font-size: 20px;
+ font-size: 25px;
font-weight: bold;
margin-bottom: 15px;
}
diff --git a/client/src/app/+about/about.component.scss b/client/src/app/+about/about.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/client/src/app/+about/about.component.ts b/client/src/app/+about/about.component.ts
index 7b65d920f..0c91cd75f 100644
--- a/client/src/app/+about/about.component.ts
+++ b/client/src/app/+about/about.component.ts
@@ -2,8 +2,7 @@ import { Component } from '@angular/core'
@Component({
selector: 'my-about',
- templateUrl: './about.component.html',
- styleUrls: [ './about.component.scss' ]
+ templateUrl: './about.component.html'
})
export class AboutComponent {
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 3b6dabcb9..248b0df50 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -64,6 +64,14 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
super()
}
+ get videoQuotaOptions () {
+ return EditCustomConfigComponent.videoQuotaOptions
+ }
+
+ get videoQuotaDailyOptions () {
+ return EditCustomConfigComponent.videoQuotaDailyOptions
+ }
+
getResolutionKey (resolution: string) {
return 'transcodingResolution' + resolution
}
diff --git a/client/src/app/shared/instance/instance-features-table.component.html b/client/src/app/shared/instance/instance-features-table.component.html
new file mode 100644
index 000000000..ba170f074
--- /dev/null
+++ b/client/src/app/shared/instance/instance-features-table.component.html
@@ -0,0 +1,28 @@
+
+
+
+
+ Video quota |
+
+
+
+ {{ initialUserVideoQuota | bytes: 0 }}
+
+
+
+
+
+ Unlimited
+
+ |
+
+
+
+ {{ feature.label }} |
+
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/client/src/app/shared/instance/instance-features-table.component.scss b/client/src/app/shared/instance/instance-features-table.component.scss
new file mode 100644
index 000000000..d597a03ba
--- /dev/null
+++ b/client/src/app/shared/instance/instance-features-table.component.scss
@@ -0,0 +1,20 @@
+@import '_variables';
+@import '_mixins';
+
+table {
+ font-size: 14px;
+ max-width: 400px;
+
+ .label {
+ font-weight: $font-semibold;
+ min-width: 330px;
+ }
+
+ .glyphicon-ok {
+ color: $green;
+ }
+
+ .glyphicon-remove {
+ color: $red;
+ }
+}
\ No newline at end of file
diff --git a/client/src/app/shared/instance/instance-features-table.component.ts b/client/src/app/shared/instance/instance-features-table.component.ts
new file mode 100644
index 000000000..1aad5aa81
--- /dev/null
+++ b/client/src/app/shared/instance/instance-features-table.component.ts
@@ -0,0 +1,84 @@
+import { Component, OnInit } from '@angular/core'
+import { ServerService } from '@app/core'
+import { I18n } from '@ngx-translate/i18n-polyfill'
+
+@Component({
+ selector: 'my-instance-features-table',
+ templateUrl: './instance-features-table.component.html',
+ styleUrls: [ './instance-features-table.component.scss' ]
+})
+export class InstanceFeaturesTableComponent implements OnInit {
+ features: { label: string, value?: boolean }[] = []
+ quotaHelpIndication = ''
+
+ constructor (
+ private i18n: I18n,
+ private serverService: ServerService
+ ) {
+ }
+
+ get initialUserVideoQuota () {
+ return this.serverService.getConfig().user.videoQuota
+ }
+
+ ngOnInit () {
+ this.serverService.configLoaded
+ .subscribe(() => {
+ this.buildFeatures()
+ this.buildQuotaHelpIndication()
+ })
+ }
+
+ private buildFeatures () {
+ const config = this.serverService.getConfig()
+
+ this.features = [
+ {
+ label: this.i18n('Transcode your videos in multiple resolutions'),
+ value: config.transcoding.enabledResolutions.length !== 0
+ },
+ {
+ label: this.i18n('HTTP import (YouTube, Vimeo, direct URL...)'),
+ value: config.import.videos.http.enabled
+ },
+ {
+ label: this.i18n('Torrent import'),
+ value: config.import.videos.torrent.enabled
+ }
+ ]
+
+ }
+
+ private getApproximateTime (seconds: number) {
+ const hours = Math.floor(seconds / 3600)
+ let pluralSuffix = ''
+ if (hours > 1) pluralSuffix = 's'
+ if (hours > 0) return `~ ${hours} hour${pluralSuffix}`
+
+ const minutes = Math.floor(seconds % 3600 / 60)
+
+ return this.i18n('~ {{minutes}} {minutes, plural, =1 {minute} other {minutes}}', { minutes })
+ }
+
+ private buildQuotaHelpIndication () {
+ if (this.initialUserVideoQuota === -1) return
+
+ const initialUserVideoQuotaBit = this.initialUserVideoQuota * 8
+
+ // 1080p: ~ 6Mbps
+ // 720p: ~ 4Mbps
+ // 360p: ~ 1.5Mbps
+ const fullHdSeconds = initialUserVideoQuotaBit / (6 * 1000 * 1000)
+ const hdSeconds = initialUserVideoQuotaBit / (4 * 1000 * 1000)
+ const normalSeconds = initialUserVideoQuotaBit / (1.5 * 1000 * 1000)
+
+ const lines = [
+ this.i18n('{{seconds}} of full HD videos', { seconds: this.getApproximateTime(fullHdSeconds) }),
+ this.i18n('{{seconds}} of HD videos', { seconds: this.getApproximateTime(hdSeconds) }),
+ this.i18n('{{seconds}} of average quality videos', { seconds: this.getApproximateTime(normalSeconds) })
+ ]
+
+ this.quotaHelpIndication = lines.join('
')
+ }
+
+}
diff --git a/client/src/app/shared/shared.module.ts b/client/src/app/shared/shared.module.ts
index 413159059..2cbaaf4ae 100644
--- a/client/src/app/shared/shared.module.ts
+++ b/client/src/app/shared/shared.module.ts
@@ -51,6 +51,7 @@ import { VideoImportService } from '@app/shared/video-import/video-import.servic
import { ActionDropdownComponent } from '@app/shared/buttons/action-dropdown.component'
import { NgbDropdownModule, NgbModalModule, NgbPopoverModule, NgbTabsetModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
import { SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/user-subscription'
+import { InstanceFeaturesTableComponent } from '@app/shared/instance/instance-features-table.component'
@NgModule({
imports: [
@@ -86,7 +87,8 @@ import { SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/u
HelpComponent,
ReactiveFileComponent,
PeertubeCheckboxComponent,
- SubscribeButtonComponent
+ SubscribeButtonComponent,
+ InstanceFeaturesTableComponent
],
exports: [
@@ -119,6 +121,7 @@ import { SubscribeButtonComponent, UserSubscriptionService } from '@app/shared/u
ReactiveFileComponent,
PeertubeCheckboxComponent,
SubscribeButtonComponent,
+ InstanceFeaturesTableComponent,
NumberFormatterPipe,
ObjectLengthPipe,
diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html
index 5fd630b09..f7b8f587b 100644
--- a/client/src/app/signup/signup.component.html
+++ b/client/src/app/signup/signup.component.html
@@ -4,19 +4,7 @@
Create an account
-