]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-share-modal/video-share.component.html
Replace all glyphicon icons
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-share-modal / video-share.component.html
index 059699d3b85dc990544ca7a1a1bc3ef6335cdbef..1b99a6c1eaba62874ec7b09c95ff8aa0d80dc7e2 100644 (file)
@@ -10,7 +10,6 @@
     <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>
 
@@ -26,8 +25,7 @@
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-
-              <my-input-toggle-hidden [value]="getPlaylistUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
+              <my-input-text [value]="getPlaylistUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text>
             </div>
           </ng-template>
         </ng-container>
@@ -37,7 +35,7 @@
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <qrcode [qrdata]="getPlaylistUrl()" [size]="256" level="Q"></qrcode>
+              <qrcode [qrdata]="getPlaylistUrl()" [width]="256" level="Q"></qrcode>
             </div>
           </ng-template>
         </ng-container>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-toggle-hidden [value]="getPlaylistIframeCode()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
+              <my-input-text
+                [value]="customizations.onlyEmbedUrl ? getPlaylistEmbedUrl() : getPlaylistIframeCode()" (change)="updateEmbedCode()"
+                [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
+              ></my-input-text>
 
               <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 class="embed" [innerHTML]="playlistEmbedHTML"></div>
             </div>
           </ng-template>
         </ng-container>
       <div class="filters">
 
         <div class="form-group" *ngIf="video">
-          <my-peertube-checkbox inputName="includeVideoInPlaylist" [(ngModel)]="includeVideoInPlaylist" i18n-labelText
-            labelText="Share the playlist at this video position"></my-peertube-checkbox>
+          <my-peertube-checkbox
+            inputName="includeVideoInPlaylist" [(ngModel)]="includeVideoInPlaylist"
+            i18n-labelText labelText="Share the playlist at this video position"
+          ></my-peertube-checkbox>
+        </div>
+
+        <div class="form-group">
+          <my-peertube-checkbox
+            *ngIf="isInPlaylistEmbedTab()"
+            inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
+            i18n-labelText labelText="Only display embed URL"
+          ></my-peertube-checkbox>
         </div>
 
       </div>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-toggle-hidden [value]="getVideoUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
+              <my-input-text [value]="getVideoUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-text>
             </div>
           </ng-template>
         </ng-container>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <qrcode [qrdata]="getVideoUrl()" [size]="256" level="Q"></qrcode>
+              <qrcode [qrdata]="getVideoUrl()" [width]="256" level="Q"></qrcode>
             </div>
           </ng-template>
         </ng-container>
 
           <ng-template ngbNavContent>
             <div class="nav-content">
-              <my-input-toggle-hidden [value]="getVideoIframeCode()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
+              <my-input-text
+                [value]="customizations.onlyEmbedUrl ? getVideoEmbedUrl() : getVideoIframeCode()" (ngModelChange)="updateEmbedCode()"
+                [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
+              ></my-input-text>
 
               <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 class="embed" [innerHTML]="videoEmbedHTML"></div>
             </div>
           </ng-template>
         </ng-container>
             ></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>
+
+          <div class="form-group" *ngIf="isInVideoEmbedTab()">
+            <my-peertube-checkbox
+              inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
+              i18n-labelText labelText="Only display embed URL"
+            ></my-peertube-checkbox>
+          </div>
         </div>
 
         <div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
               ></my-peertube-checkbox>
             </div>
 
-            <div *ngIf="!isLocalVideo() && !isVideoInEmbedTab()" class="form-group">
+            <div *ngIf="!isLocalVideo() && !isInVideoEmbedTab()" class="form-group">
               <my-peertube-checkbox
                 inputName="originUrl" [(ngModel)]="customizations.originUrl"
                 i18n-labelText labelText="Use origin instance URL"
             </div>
           </div>
 
-          <ng-container *ngIf="isVideoInEmbedTab()">
+          <ng-container *ngIf="isInVideoEmbedTab()">
             <div class="form-group">
               <my-peertube-checkbox
                 inputName="title" [(ngModel)]="customizations.title"
               ></my-peertube-checkbox>
             </div>
 
+            <div class="form-group">
+              <my-peertube-checkbox
+                inputName="embedP2P" [(ngModel)]="customizations.embedP2P"
+                i18n-labelText labelText="P2P"
+              ></my-peertube-checkbox>
+            </div>
+
             <div class="form-group">
               <my-peertube-checkbox
                 inputName="warningTitle" [(ngModel)]="customizations.warningTitle"
-                i18n-labelText labelText="Display privacy warning"
+                i18n-labelText labelText="Display privacy warning" [disabled]="!customizations.embedP2P"
               ></my-peertube-checkbox>
             </div>
 
             <div class="form-group">
               <my-peertube-checkbox
-                inputName="controls" [(ngModel)]="customizations.controls"
-                i18n-labelText labelText="Display player controls"
+                inputName="controlBar" [(ngModel)]="customizations.controlBar"
+                i18n-labelText labelText="Display player control bar"
               ></my-peertube-checkbox>
             </div>
 
             <div class="form-group">
               <my-peertube-checkbox
-                inputName="controls" [(ngModel)]="customizations.peertubeLink"
+                inputName="peertubeLink" [(ngModel)]="customizations.peertubeLink"
                 i18n-labelText labelText="Display PeerTube button link"
               ></my-peertube-checkbox>
             </div>
              [attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic">
 
           <ng-container *ngIf="isAdvancedCustomizationCollapsed">
-            <span class="glyphicon glyphicon-menu-down"></span>
+            <span class="chevron-down"></span>
 
             <ng-container i18n>
               More customization
           </ng-container>
 
           <ng-container *ngIf="!isAdvancedCustomizationCollapsed">
-            <span class="glyphicon glyphicon-menu-up"></span>
+            <span class="chevron-up"></span>
 
             <ng-container i18n>
               Less customization