]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+accounts/account-about/account-about.component.ts
Implement video channel views
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / account-about / account-about.component.ts
CommitLineData
0626e7af
C
1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router'
3import { Location } from '@angular/common'
4import { getParameterByName, immutableAssign } from '@app/shared/misc/utils'
5import { NotificationsService } from 'angular2-notifications'
6import 'rxjs/add/observable/from'
7import 'rxjs/add/operator/concatAll'
8import { AuthService } from '../../core/auth'
9import { ConfirmService } from '../../core/confirm'
10import { AbstractVideoList } from '../../shared/video/abstract-video-list'
11import { VideoService } from '../../shared/video/video.service'
12import { Account } from '@app/shared/account/account.model'
13import { AccountService } from '@app/shared/account/account.service'
14
15@Component({
16 selector: 'my-account-about',
17 templateUrl: './account-about.component.html',
18 styleUrls: [ './account-about.component.scss' ]
19})
20export class AccountAboutComponent implements OnInit {
6b738c7a 21 account: Account
0626e7af
C
22
23 constructor (
24 protected route: ActivatedRoute,
25 private accountService: AccountService
26 ) { }
27
28 ngOnInit () {
29 // Parent get the account for us
30 this.accountService.accountLoaded
31 .subscribe(account => this.account = account)
32 }
33
34 getAccountDescription () {
35 if (this.account.description) return this.account.description
36
37 return 'No description'
38 }
39}