]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add sync link to import page
authorChocobozzz <me@florianbigard.com>
Wed, 17 Aug 2022 09:55:29 +0000 (11:55 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 17 Aug 2022 11:40:00 +0000 (13:40 +0200)
client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.scss
client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.html
client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
client/src/app/+videos/+video-edit/video-add-components/video-send.scss

index 09b71018ffbd04fdf3afa3977ef0ae920f4a221c..42d74725e9e88fda7a746d63c4a914fb61fe76f4 100644 (file)
@@ -2,11 +2,3 @@
   margin-top: 15px;
 }
 
-.peertube-radio-container {
-  width: 250px;
-
-  .form-group-description {
-    white-space: nowrap;
-  }
-}
-
index 67e1cb418fff5ee6bd3acc9ca4e82cffbc65b98a..a80d31aaf9bcad8bad5652b40e5a701e71cf2ee0 100644 (file)
       </my-help>
 
       <input type="text" id="targetUrl" [(ngModel)]="targetUrl" class="form-control" />
+
+      <div *ngIf="isChannelSyncEnabled()" class="form-group-description" i18n>
+        You can also synchronize a remote channel in <a routerLink="/my-library/video-channel-syncs">your library</a>
+      </div>
     </div>
 
     <div class="form-group">
index 4ef7d1321de65895d61e1c560a724d4facf006cc..422f0c64329993aa7965db640ebf9499eb0d1f1b 100644 (file)
@@ -64,6 +64,10 @@ export class VideoImportUrlComponent extends VideoSend implements OnInit, AfterV
     return this.targetUrl?.match(/https?:\/\//)
   }
 
+  isChannelSyncEnabled () {
+    return this.serverConfig.import.videoChannelSynchronization.enabled
+  }
+
   importVideo () {
     this.isImportingVideo = true
 
index ed46fefb07d326542ac350896f222e87ad39f65d..684ab23cc4dce82f130a44e7767fc687702b3bfe 100644 (file)
@@ -1,7 +1,7 @@
 @use '_variables' as *;
 @use '_mixins' as *;
 
-$width-size: 250px;
+$width-size: 275px;
 
 .alert.alert-danger {
   text-align: center;
@@ -27,7 +27,9 @@ $width-size: 250px;
     @include peertube-select-container($width-size);
   }
   my-select-options ::ng-deep ng-select,
-  my-select-channel ::ng-deep ng-select {
+  my-select-channel ::ng-deep ng-select,
+  .peertube-radio-container,
+  .form-group-description {
     width: $width-size;
 
     @media screen and (max-width: $width-size) {
@@ -35,6 +37,10 @@ $width-size: 250px;
     }
   }
 
+  .form-group-description {
+    white-space: nowrap;
+  }
+
   input[type=text] {
     @include peertube-input-text($width-size);
     display: block;