From 5411da31d1070654e4c4b80ad3ad6889b048a4db Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 23 Mar 2020 23:43:51 +0100 Subject: [PATCH] Describe user video settings checkboxes, put emphasis on p2p Also improve more info links about p2p and privacy in PeerTube, present in the privacy concern notice and in the video settings. --- .../about-peertube.component.html | 9 ++++--- .../about-peertube.component.ts | 12 +++++++-- .../my-account-danger-zone.component.html | 4 +-- .../my-account-danger-zone.component.scss | 1 + .../my-account-danger-zone.component.ts | 2 +- .../my-account-video-settings.component.html | 26 ++++++++++++++----- .../forms/peertube-checkbox.component.html | 2 ++ .../forms/peertube-checkbox.component.scss | 15 +++++++++++ .../forms/peertube-checkbox.component.ts | 1 + .../+video-watch/video-watch.component.html | 2 +- 10 files changed, 58 insertions(+), 16 deletions(-) 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 26a3d4554..e5a8b2097 100644 --- a/client/src/app/+about/about-peertube/about-peertube.component.html +++ b/client/src/app/+about/about-peertube/about-peertube.component.html @@ -65,8 +65,11 @@
-
-

P2P & Privacy

+
+

+
+ P2P & Privacy +

PeerTube uses the BitTorrent protocol to share bandwidth between users by default to help lower the load on the server, @@ -95,7 +98,7 @@

  • For each request sent, the tracker returns random peers at a limited number. For instance, if there are 1000 peers in the swarm and the tracker sends only 20 peers for each request, there must be at least 50 - requests sent to know every peers in the swarm + requests sent to know every peer in the swarm
  • diff --git a/client/src/app/+about/about-peertube/about-peertube.component.ts b/client/src/app/+about/about-peertube/about-peertube.component.ts index 64fd30837..98c5f93c3 100644 --- a/client/src/app/+about/about-peertube/about-peertube.component.ts +++ b/client/src/app/+about/about-peertube/about-peertube.component.ts @@ -1,4 +1,5 @@ -import { Component } from '@angular/core' +import { Component, AfterViewChecked } from '@angular/core' +import { ViewportScroller } from '@angular/common' @Component({ selector: 'my-about-peertube', @@ -6,5 +7,12 @@ import { Component } from '@angular/core' styleUrls: [ './about-peertube.component.scss' ] }) -export class AboutPeertubeComponent { +export class AboutPeertubeComponent implements AfterViewChecked { + constructor ( + private viewportScroller: ViewportScroller + ) {} + + ngAfterViewChecked () { + if (window.location.hash) this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) + } } diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html index dd9b56585..6e22abeed 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html @@ -1,5 +1,5 @@
    -

    Once you delete your account, there is no going back.

    +

    Once you delete your account, there is no going back. You will be asked to confirm this action.

    -
    \ No newline at end of file +
  • diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss index 0ca310468..7f7806732 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss @@ -7,5 +7,6 @@ button { @include peertube-button; @include grey-button; + @include disable-outline; } } \ No newline at end of file diff --git a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts index 41021c592..25d862867 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts @@ -24,7 +24,7 @@ export class MyAccountDangerZoneComponent { async deleteMe () { const res = await this.confirmService.confirmWithInput( - this.i18n('Are you sure you want to delete your account? This will delete all your data, including channels, videos etc.'), + this.i18n('Are you sure you want to delete your account? This will delete all your data, including channels, videos and comments. Content cached by other servers and other third-parties might make longer to be deleted.'), this.i18n('Type your username to confirm'), this.user.username, this.i18n('Delete your account'), diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html index f17829127..7f4437b19 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html @@ -39,23 +39,35 @@
    + inputName="webTorrentEnabled" formControlName="webTorrentEnabled" [recommended]="true" + i18n-labelText labelText="Help share videos being played" + > + + The sharing system implies that some technical information about your system (such as a public IP address) can be sent to other peers, but greatly helps to reduce server load. + +
    + i18n-labelText labelText="Automatically play videos" + > + + When on a video page, directly start playing the video. + +
    + i18n-labelText labelText="Automatically start playing the next video" + > + + When a video ends, follow up with the next suggested video. + +
    diff --git a/client/src/app/shared/forms/peertube-checkbox.component.html b/client/src/app/shared/forms/peertube-checkbox.component.html index c740d852c..704f3e696 100644 --- a/client/src/app/shared/forms/peertube-checkbox.component.html +++ b/client/src/app/shared/forms/peertube-checkbox.component.html @@ -29,6 +29,8 @@ + +
    diff --git a/client/src/app/shared/forms/peertube-checkbox.component.scss b/client/src/app/shared/forms/peertube-checkbox.component.scss index 3120509b3..c1233e8a5 100644 --- a/client/src/app/shared/forms/peertube-checkbox.component.scss +++ b/client/src/app/shared/forms/peertube-checkbox.component.scss @@ -34,4 +34,19 @@ .wrapper:empty { display: none; } + + .recommended { + margin-left: .5rem; + align-self: baseline; + display: inline-block; + padding: 4px 6px; + cursor: default; + border-radius: 3px; + font-size: 12px; + line-height: 12px; + font-weight: 500; + color: var(--inputPlaceholderColor); + background-color: rgba(217,225,232,.1); + border: 1px solid rgba(217,225,232,.5); + } } \ No newline at end of file diff --git a/client/src/app/shared/forms/peertube-checkbox.component.ts b/client/src/app/shared/forms/peertube-checkbox.component.ts index cb7ec8eda..89e79fecd 100644 --- a/client/src/app/shared/forms/peertube-checkbox.component.ts +++ b/client/src/app/shared/forms/peertube-checkbox.component.ts @@ -21,6 +21,7 @@ export class PeertubeCheckboxComponent implements ControlValueAccessor, AfterCon @Input() labelInnerHTML: string @Input() helpPlacement = 'top auto' @Input() disabled = false + @Input() recommended = false @ContentChildren(PeerTubeTemplateDirective) templates: QueryList> diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 307143319..0244860dd 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -263,7 +263,7 @@ the sharing system used for this video implies that some technical information about your system (such as a public IP address) can be sent to other peers. - More information + More information
    -- 2.41.0