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