]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Describe user video settings checkboxes, put emphasis on p2p
authorRigel Kent <sendmemail@rigelk.eu>
Mon, 23 Mar 2020 22:43:51 +0000 (23:43 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Mon, 23 Mar 2020 22:43:53 +0000 (23:43 +0100)
Also improve more info links about p2p and privacy in PeerTube,
present in the privacy concern notice and in the video settings.

client/src/app/+about/about-peertube/about-peertube.component.html
client/src/app/+about/about-peertube/about-peertube.component.ts
client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.html
client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.scss
client/src/app/+my-account/my-account-settings/my-account-danger-zone/my-account-danger-zone.component.ts
client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html
client/src/app/shared/forms/peertube-checkbox.component.html
client/src/app/shared/forms/peertube-checkbox.component.scss
client/src/app/shared/forms/peertube-checkbox.component.ts
client/src/app/videos/+video-watch/video-watch.component.html

index 26a3d45542c9a809cc4d6516e9a8f27895cc6d6a..e5a8b2097ab2a9e077dbca37db82eb64e2cae86f 100644 (file)
   <div class="privacy-contributors">
     <my-about-peertube-contributors></my-about-peertube-contributors>
 
-    <div class="p2p-privacy">
-      <h3 i18n class="section-title">P2P & Privacy</h3>
+    <div class="p2p-privacy">     
+      <h3 class="section-title">
+        <div class="anchor" id="privacy"></div> <!-- privacy anchor -->
+        <ng-container i18n>P2P & Privacy</ng-container>
+      </h3>
 
       <p i18n>
         PeerTube uses the BitTorrent protocol to share bandwidth between users by default to help lower the load on the server,
@@ -95,7 +98,7 @@
         <li i18n>
           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
         </li>
 
         <li i18n>
index 64fd3083708b6b2c7298b2dbacf0c65c9f2f16c2..98c5f93c3f6c86fd9dfaf28a0b3d930897d34e55 100644 (file)
@@ -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('#', ''))
+  }
 }
index dd9b565851e0e1c375f2abe6e535491d02455472..6e22abeedbb6994c190e75b78ac5c697963b7c4c 100644 (file)
@@ -1,5 +1,5 @@
 <div class="delete-me">
-  <p i18n>Once you delete your account, there is no going back.</p>
+  <p i18n>Once you delete your account, there is no going back. You will be asked to confirm this action.</p>
 
   <button (click)="deleteMe()" i18n>Delete your account</button>
-</div>
\ No newline at end of file
+</div>
index 0ca310468237966f19d8ed1cd54c14bf8a4faa4b..7f78067323541951ee7ea3b58fd8405473a4f77b 100644 (file)
@@ -7,5 +7,6 @@
   button {
     @include peertube-button;
     @include grey-button;
+    @include disable-outline;
   }
 }
\ No newline at end of file
index 41021c59295e52209f9c85ba945b65f07d774010..25d8628677b1f37f3d604c74463e335c38662c0b 100644 (file)
@@ -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'),
index f17829127d1ba9c6ed0a6bf6fb001bde03fc878d..7f4437b19bcdf7f837be9fcd32209ee6189b3089 100644 (file)
 
   <div class="form-group">
     <my-peertube-checkbox
-      inputName="webTorrentEnabled" formControlName="webTorrentEnabled"
-      i18n-labelText labelText="Use P2P to exchange parts of the video with others"
-    ></my-peertube-checkbox>
+      inputName="webTorrentEnabled" formControlName="webTorrentEnabled" [recommended]="true"
+      i18n-labelText labelText="Help share videos being played"
+    >
+      <ng-container ngProjectAs="description">
+        <span i18n>The <a routerLink="/about/peertube" fragment="privacy">sharing system</a> 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.</span>
+      </ng-container>
+    </my-peertube-checkbox>
   </div>
 
   <div class="form-group">
     <my-peertube-checkbox
       inputName="autoPlayVideo" formControlName="autoPlayVideo"
-      i18n-labelText labelText="Automatically plays video"
-    ></my-peertube-checkbox>
+      i18n-labelText labelText="Automatically play videos"
+    >
+      <ng-container ngProjectAs="description">
+        <span i18n>When on a video page, directly start playing the video.</span>
+      </ng-container>
+    </my-peertube-checkbox>
   </div>
 
   <div class="form-group">
     <my-peertube-checkbox
       inputName="autoPlayNextVideo" formControlName="autoPlayNextVideo"
-      i18n-labelText labelText="Automatically starts playing next video"
-    ></my-peertube-checkbox>
+      i18n-labelText labelText="Automatically start playing the next video"
+    >
+      <ng-container ngProjectAs="description">
+        <span i18n>When a video ends, follow up with the next suggested video.</span>
+      </ng-container>
+    </my-peertube-checkbox>
   </div>
 
   <input *ngIf="!reactiveUpdate" type="submit" i18n-value value="Save" [disabled]="!form.valid">
index c740d852c73644a67d81377f0851bbf4a5d0db6d..704f3e6969a0b545fdcfb7c878acc8c9d3161bc9 100644 (file)
@@ -29,6 +29,8 @@
         <ng-template *ngTemplateOutlet="helpTemplate"></ng-template>
       </ng-template>
     </my-help>
+
+    <div *ngIf="recommended" class="recommended" i18n>Recommended</div>
   </div>
 
   <div class="ml-4 d-flex flex-column">
index 3120509b3b46a9d78b752ac01de59c691090a436..c1233e8a5e79875be68994581d8c6072da319cfa 100644 (file)
   .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
index cb7ec8eda62eadf8e75b6e332e5d759ab9dd9a17..89e79fecd6a4dd6cf48f9bdb9d40be7a747964bf 100644 (file)
@@ -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<PeerTubeTemplateDirective<'label' | 'help'>>
 
index 307143319c79448ad33c65a69471d17ad5093ad2..0244860dd0a4bb767d916678391d8af7daf56c6a 100644 (file)
           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.
         </ng-container>
       </span>
-      <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube">More information</a>
+      <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube#privacy">More information</a>
     </div>
 
     <div i18n class="privacy-concerns-button privacy-concerns-okay" (click)="acceptedPrivacyConcern()">