aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-01 16:52:59 +0200
committerChocobozzz <me@florianbigard.com>2020-04-01 16:52:59 +0200
commit45c6bcf312d2e9578501eaaf7511183bc570fe91 (patch)
tree6f526b1e132f532efa0916765222d260618f8095 /client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
parentd96994289b24c4bbd056660c5fe11fff0f77635e (diff)
downloadPeerTube-45c6bcf312d2e9578501eaaf7511183bc570fe91.tar.gz
PeerTube-45c6bcf312d2e9578501eaaf7511183bc570fe91.tar.zst
PeerTube-45c6bcf312d2e9578501eaaf7511183bc570fe91.zip
Remove deprecated NgbTabsetModule module
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts13
1 files changed, 7 insertions, 6 deletions
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 }