]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+about/about-peertube/about-peertube.component.ts
Add mute status in account and channel pages
[github/Chocobozzz/PeerTube.git] / client / src / app / +about / about-peertube / about-peertube.component.ts
CommitLineData
5411da31
RK
1import { Component, AfterViewChecked } from '@angular/core'
2import { ViewportScroller } from '@angular/common'
78f912ed
C
3
4@Component({
5 selector: 'my-about-peertube',
6 templateUrl: './about-peertube.component.html',
7 styleUrls: [ './about-peertube.component.scss' ]
8})
9
5411da31 10export class AboutPeertubeComponent implements AfterViewChecked {
64e0f8cf
C
11 private lastScrollHash: string
12
5411da31
RK
13 constructor (
14 private viewportScroller: ViewportScroller
15 ) {}
16
17 ngAfterViewChecked () {
64e0f8cf
C
18 if (window.location.hash && window.location.hash !== this.lastScrollHash) {
19 this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', ''))
20
21 this.lastScrollHash = window.location.hash
22 }
5411da31 23 }
78f912ed 24}