]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+accounts/account-about/account-about.component.ts
f063df392624651f608f2e9d2400836235ba9d0a
[github/Chocobozzz/PeerTube.git] / client / src / app / +accounts / account-about / account-about.component.ts
1 import { Component, OnInit } from '@angular/core'
2 import { ActivatedRoute } from '@angular/router'
3 import { Account } from '@app/shared/account/account.model'
4 import { AccountService } from '@app/shared/account/account.service'
5
6 @Component({
7 selector: 'my-account-about',
8 templateUrl: './account-about.component.html',
9 styleUrls: [ './account-about.component.scss' ]
10 })
11 export class AccountAboutComponent implements OnInit {
12 account: Account
13
14 constructor (
15 protected route: ActivatedRoute,
16 private accountService: AccountService
17 ) { }
18
19 ngOnInit () {
20 // Parent get the account for us
21 this.accountService.accountLoaded
22 .subscribe(account => this.account = account)
23 }
24
25 getAccountDescription () {
26 if (this.account.description) return this.account.description
27
28 return 'No description'
29 }
30 }