]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - 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
1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router'
3import { Account } from '@app/shared/account/account.model'
4import { AccountService } from '@app/shared/account/account.service'
5import { I18n } from '@ngx-translate/i18n-polyfill'
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 {
13 account: Account
14
15 constructor (
16 private route: ActivatedRoute,
17 private i18n: I18n,
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
30 return this.i18n('No description')
31 }
32}