aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html55
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts13
2 files changed, 39 insertions, 29 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index 9991e1f63..bde27b206 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -1,9 +1,11 @@
1<form role="form" [formGroup]="form"> 1<form role="form" [formGroup]="form">
2 2
3 <ngb-tabset #tabs class="root-tabset bootstrap"> 3 <div ngbNav #nav="ngbNav" class="nav-tabs">
4 4
5 <ngb-tab id="instance-information" i18n-title title="Instance information"> 5 <ng-container ngbNavItem="instance-information">
6 <ng-template ngbTabContent> 6 <a ngbNavLink i18n>Instance information</a>
7
8 <ng-template ngbNavContent>
7 9
8 <ng-container formGroupName="instance"> 10 <ng-container formGroupName="instance">
9 11
@@ -225,10 +227,12 @@
225 227
226 </ng-container> 228 </ng-container>
227 </ng-template> 229 </ng-template>
228 </ngb-tab> 230 </ng-container>
231
232 <ng-container ngbNavItem="basic-configuration">
233 <a ngbNavLink i18n>Basic configuration</a>
229 234
230 <ngb-tab id="basic-configuration" i18n-title title="Basic configuration"> 235 <ng-template ngbNavContent>
231 <ng-template ngbTabContent>
232 236
233 <div class="form-row mt-5"> <!-- appearance grid --> 237 <div class="form-row mt-5"> <!-- appearance grid -->
234 <div class="form-group col-12 col-lg-4 col-xl-3"> 238 <div class="form-group col-12 col-lg-4 col-xl-3">
@@ -348,7 +352,7 @@
348 352
349 <ng-container formGroupName="import"> 353 <ng-container formGroupName="import">
350 <ng-container formGroupName="videos"> 354 <ng-container formGroupName="videos">
351 355
352 <div class="form-group" formGroupName="http"> 356 <div class="form-group" formGroupName="http">
353 <my-peertube-checkbox 357 <my-peertube-checkbox
354 inputName="importVideosHttpEnabled" formControlName="enabled" 358 inputName="importVideosHttpEnabled" formControlName="enabled"
@@ -369,7 +373,7 @@
369 <ng-container formGroupName="autoBlacklist"> 373 <ng-container formGroupName="autoBlacklist">
370 <ng-container formGroupName="videos"> 374 <ng-container formGroupName="videos">
371 <ng-container formGroupName="ofUsers"> 375 <ng-container formGroupName="ofUsers">
372 376
373 <div class="form-group"> 377 <div class="form-group">
374 <my-peertube-checkbox 378 <my-peertube-checkbox
375 inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled" 379 inputName="autoBlacklistVideosOfUsersEnabled" formControlName="enabled"
@@ -380,7 +384,7 @@
380 </ng-container> 384 </ng-container>
381 </my-peertube-checkbox> 385 </my-peertube-checkbox>
382 </div> 386 </div>
383 387
384 </ng-container> 388 </ng-container>
385 </ng-container> 389 </ng-container>
386 </ng-container> 390 </ng-container>
@@ -490,10 +494,12 @@
490 </div> 494 </div>
491 495
492 </ng-template> 496 </ng-template>
493 </ngb-tab> 497 </ng-container>
498
499 <ng-container ngbNavItem="services">
500 <a ngbNavLink i18n>Services</a>
494 501
495 <ngb-tab id="services" i18n-title title="Services"> 502 <ng-template ngbNavContent>
496 <ng-template ngbTabContent>
497 503
498 <div class="form-row mt-5"> <!-- twitter grid --> 504 <div class="form-row mt-5"> <!-- twitter grid -->
499 <div class="form-group col-12 col-lg-4 col-xl-3"> 505 <div class="form-group col-12 col-lg-4 col-xl-3">
@@ -541,12 +547,13 @@
541 547
542 </div> 548 </div>
543 </div> 549 </div>
550 </ng-template>
551 </ng-container>
544 552
545 </ng-template> 553 <ng-container ngbNavItem="advanced-configuration">
546 </ngb-tab> 554 <a ngbNavLink i18n>Advanced configuration</a>
547 555
548 <ngb-tab id="advanced-configuration" i18n-title title="Advanced configuration"> 556 <ng-template ngbNavContent>
549 <ng-template ngbTabContent>
550 557
551 <div class="form-row mt-5"> <!-- transcoding grid --> 558 <div class="form-row mt-5"> <!-- transcoding grid -->
552 <div class="form-group col-12 col-lg-4 col-xl-3"> 559 <div class="form-group col-12 col-lg-4 col-xl-3">
@@ -566,7 +573,7 @@
566 <ng-template ptTemplate="label"> 573 <ng-template ptTemplate="label">
567 <ng-container i18n>Transcoding enabled</ng-container> 574 <ng-container i18n>Transcoding enabled</ng-container>
568 </ng-template> 575 </ng-template>
569 576
570 <ng-template ptTemplate="help"> 577 <ng-template ptTemplate="help">
571 <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container> 578 <ng-container i18n>If you disable transcoding, many videos from your users will not work!</ng-container>
572 </ng-template> 579 </ng-template>
@@ -583,7 +590,7 @@
583 </ng-container> 590 </ng-container>
584 </my-peertube-checkbox> 591 </my-peertube-checkbox>
585 </div> 592 </div>
586 593
587 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }"> 594 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }">
588 <my-peertube-checkbox 595 <my-peertube-checkbox
589 inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles" 596 inputName="transcodingAllowAudioFiles" formControlName="allowAudioFiles"
@@ -604,7 +611,7 @@
604 <ng-template ptTemplate="help"> 611 <ng-template ptTemplate="help">
605 <ng-container i18n> 612 <ng-container i18n>
606 <strong>Experimental, we suggest you to not disable webtorrent support for now</strong> 613 <strong>Experimental, we suggest you to not disable webtorrent support for now</strong>
607 614
608 <p>If you also enabled HLS support, it will multiply videos storage by 2</p> 615 <p>If you also enabled HLS support, it will multiply videos storage by 2</p>
609 616
610 <br /> 617 <br />
@@ -625,14 +632,14 @@
625 <ng-template ptTemplate="help"> 632 <ng-template ptTemplate="help">
626 <ng-container i18n> 633 <ng-container i18n>
627 <strong>Requires ffmpeg >= 4.1</strong> 634 <strong>Requires ffmpeg >= 4.1</strong>
628 635
629 <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p> 636 <p>Generate HLS playlists and fragmented MP4 files resulting in a better playback than with the current default player:</p>
630 <ul> 637 <ul>
631 <li>Resolution change is smoother</li> 638 <li>Resolution change is smoother</li>
632 <li>Faster playback in particular with long videos</li> 639 <li>Faster playback in particular with long videos</li>
633 <li>More stable playback (less bugs/infinite loading)</li> 640 <li>More stable playback (less bugs/infinite loading)</li>
634 </ul> 641 </ul>
635 642
636 <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p> 643 <p>If you also enabled WebTorrent support, it will multiply videos storage by 2</p>
637 </ng-container> 644 </ng-container>
638 </ng-template> 645 </ng-template>
@@ -785,8 +792,10 @@
785 </div> 792 </div>
786 793
787 </ng-template> 794 </ng-template>
788 </ngb-tab> 795 </ng-container>
789 </ngb-tabset> 796 </div>
797
798 <div [ngbNavOutlet]="nav"></div>
790 799
791 <div class="form-row mt-4"> <!-- submit placement block --> 800 <div class="form-row mt-4"> <!-- submit placement block -->
792 <div class="col-md-7 col-xl-5"></div> 801 <div class="col-md-7 col-xl-5"></div>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index d81859d5c..cea314cea 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -1,4 +1,4 @@
1import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core' 1import { AfterViewChecked, Component, OnInit, ViewChild } from '@angular/core'
2import { ConfigService } from '@app/+admin/config/shared/config.service' 2import { ConfigService } from '@app/+admin/config/shared/config.service'
3import { ServerService } from '@app/core/server/server.service' 3import { ServerService } from '@app/core/server/server.service'
4import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared' 4import { CustomConfigValidatorsService, FormReactive, UserValidatorsService } from '@app/shared'
@@ -10,7 +10,7 @@ import { SelectItem } from 'primeng/api'
10import { forkJoin } from 'rxjs' 10import { forkJoin } from 'rxjs'
11import { ServerConfig } from '@shared/models' 11import { ServerConfig } from '@shared/models'
12import { ViewportScroller } from '@angular/common' 12import { ViewportScroller } from '@angular/common'
13import { NgbTabset } from '@ng-bootstrap/ng-bootstrap' 13import { NgbNav } from '@ng-bootstrap/ng-bootstrap'
14 14
15@Component({ 15@Component({
16 selector: 'my-edit-custom-config', 16 selector: 'my-edit-custom-config',
@@ -18,7 +18,8 @@ import { NgbTabset } from '@ng-bootstrap/ng-bootstrap'
18 styleUrls: [ './edit-custom-config.component.scss' ] 18 styleUrls: [ './edit-custom-config.component.scss' ]
19}) 19})
20export class EditCustomConfigComponent extends FormReactive implements OnInit, AfterViewChecked { 20export class EditCustomConfigComponent extends FormReactive implements OnInit, AfterViewChecked {
21 @ViewChild('tabs') tabs: NgbTabset 21 // FIXME: use built-in router
22 @ViewChild('nav') nav: NgbNav
22 23
23 initDone = false 24 initDone = false
24 customConfig: CustomConfig 25 customConfig: CustomConfig
@@ -286,13 +287,13 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
286 } 287 }
287 288
288 gotoAnchor () { 289 gotoAnchor () {
289 const hashToTab = { 290 const hashToNav = {
290 'customizations': 'advanced-configuration' 291 'customizations': 'advanced-configuration'
291 } 292 }
292 const hash = window.location.hash.replace('#', '') 293 const hash = window.location.hash.replace('#', '')
293 294
294 if (hash && Object.keys(hashToTab).includes(hash)) { 295 if (hash && Object.keys(hashToNav).includes(hash)) {
295 this.tabs.select(hashToTab[hash]) 296 this.nav.select(hashToNav[hash])
296 setTimeout(() => this.viewportScroller.scrollToAnchor(hash), 100) 297 setTimeout(() => this.viewportScroller.scrollToAnchor(hash), 100)
297 } 298 }
298 } 299 }