]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-share-modal/video-share.component.html
Fix services tests
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-share-modal / video-share.component.html
index 4174458b541292e188a0ed01cbfe1679ab97342c..e5cee1b2f9d1c99a6b1be8d8dd81db5d758c2d11 100644 (file)
     <div class="playlist" *ngIf="playlist">
       <div class="title-page title-page-single" i18n *ngIf="video">Share the playlist</div>
 
+      <div *ngIf="isPrivatePlaylist()" class="alert-private alert alert-warning">
+        <div i18n>This playlist is private so you won't be able to share it with external users</div>
+
+        <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/my-library/video-playlists/update', playlist.uuid ]" target="_blank" rel="noopener noreferrer">
+          Update playlist privacy
+        </a>
+      </div>
+
       <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activePlaylistId">
 
         <ng-container ngbNavItem="url">
@@ -18,7 +26,7 @@
           <ng-template ngbNavContent>
             <div class="nav-content">
 
-              <my-input-readonly-copy [value]="getPlaylistUrl()"></my-input-readonly-copy>
+              <my-input-toggle-hidden [value]="getPlaylistUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
             </div>
           </ng-template>
         </ng-container>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-readonly-copy [value]="getPlaylistIframeCode()"></my-input-readonly-copy>
+              <my-input-toggle-hidden
+                [value]="getPlaylistIframeCode()" (change)="updateEmbedCode()"
+                [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
+              ></my-input-toggle-hidden>
 
               <div i18n *ngIf="notSecure()" class="alert alert-warning">
                 The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites).
               </div>
+
+              <div [innerHTML]="playlistEmbedHTML"></div>
             </div>
           </ng-template>
         </ng-container>
     <div class="video" *ngIf="video">
       <div class="title-page title-page-single" *ngIf="playlist" i18n>Share the video</div>
 
+      <div *ngIf="isPrivateVideo()" class="alert-private alert alert-warning">
+        <div i18n>This video is private so you won't be able to share it with external users</div>
+
+        <a i18n class="peertube-button-link orange-button" [routerLink]="[ '/videos/', 'update', video.shortUUID ]" target="_blank" rel="noopener noreferrer">
+          Update video privacy
+        </a>
+      </div>
+
       <div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activeVideoId">
 
         <ng-container ngbNavItem="url">
@@ -72,7 +93,7 @@
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-readonly-copy [value]="getVideoUrl()"></my-input-readonly-copy>
+              <my-input-toggle-hidden [value]="getVideoUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
             </div>
           </ng-template>
         </ng-container>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-readonly-copy [value]="getVideoIframeCode()"></my-input-readonly-copy>
+              <my-input-toggle-hidden
+                [value]="getVideoIframeCode()" (ngModelChange)="updateEmbedCode()"
+                [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
+              ></my-input-toggle-hidden>
 
               <div i18n *ngIf="notSecure()" class="alert alert-warning">
                 The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites).
               </div>
+
+              <div [innerHTML]="videoEmbedHTML"></div>
             </div>
           </ng-template>
         </ng-container>
 
       <div class="filters">
         <div>
-          <div class="form-group start-at">
+          <div class="form-group start-at" *ngIf="!video.isLive">
             <my-peertube-checkbox
               inputName="startAt" [(ngModel)]="customizations.startAtCheckbox"
               i18n-labelText labelText="Start at"
             ></my-peertube-checkbox>
 
             <div class="peertube-select-container" [ngClass]="{ disabled: !customizations.subtitleCheckbox }">
-              <select [(ngModel)]="customizations.subtitle" [disabled]="!customizations.subtitleCheckbox">
+              <select [(ngModel)]="customizations.subtitle" [disabled]="!customizations.subtitleCheckbox" class="form-control">
                 <option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option>
               </select>
             </div>
 
         <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
           <div>
-            <div class="form-group stop-at">
+            <div class="form-group stop-at" *ngIf="!video.isLive">
               <my-peertube-checkbox
                 inputName="stopAt" [(ngModel)]="customizations.stopAtCheckbox"
                 i18n-labelText labelText="Stop at"
               ></my-peertube-checkbox>
             </div>
 
-            <div class="form-group">
+            <div class="form-group" *ngIf="!video.isLive">
               <my-peertube-checkbox
                 inputName="loop" [(ngModel)]="customizations.loop"
                 i18n-labelText labelText="Loop"
               ></my-peertube-checkbox>
             </div>
+
+            <div *ngIf="!isLocalVideo() && !isVideoInEmbedTab()" class="form-group">
+              <my-peertube-checkbox
+                inputName="originUrl" [(ngModel)]="customizations.originUrl"
+                i18n-labelText labelText="Use origin instance URL"
+              ></my-peertube-checkbox>
+            </div>
           </div>
 
           <ng-container *ngIf="isVideoInEmbedTab()">