aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+accounts')
-rw-r--r--client/src/app/+accounts/account-about/account-about.component.html2
-rw-r--r--client/src/app/+accounts/account-about/account-about.component.ts12
2 files changed, 10 insertions, 4 deletions
diff --git a/client/src/app/+accounts/account-about/account-about.component.html b/client/src/app/+accounts/account-about/account-about.component.html
index b178f5cc8..f857e5a52 100644
--- a/client/src/app/+accounts/account-about/account-about.component.html
+++ b/client/src/app/+accounts/account-about/account-about.component.html
@@ -1,7 +1,7 @@
1<div *ngIf="account" class="row"> 1<div *ngIf="account" class="row">
2 <div class="block col-md-6 col-sm-12"> 2 <div class="block col-md-6 col-sm-12">
3 <div i18n class="small-title">Description</div> 3 <div i18n class="small-title">Description</div>
4 <div class="content">{{ getAccountDescription() }}</div> 4 <div class="content" [innerHtml]="getAccountDescription()"></div>
5 </div> 5 </div>
6 6
7 <div class="block col-md-6 col-sm-12"> 7 <div class="block col-md-6 col-sm-12">
diff --git a/client/src/app/+accounts/account-about/account-about.component.ts b/client/src/app/+accounts/account-about/account-about.component.ts
index c0e793754..2acf67a59 100644
--- a/client/src/app/+accounts/account-about/account-about.component.ts
+++ b/client/src/app/+accounts/account-about/account-about.component.ts
@@ -4,6 +4,7 @@ import { Account } from '@app/shared/account/account.model'
4import { AccountService } from '@app/shared/account/account.service' 4import { AccountService } from '@app/shared/account/account.service'
5import { I18n } from '@ngx-translate/i18n-polyfill' 5import { I18n } from '@ngx-translate/i18n-polyfill'
6import { Subscription } from 'rxjs' 6import { Subscription } from 'rxjs'
7import { MarkdownService } from '@app/videos/shared'
7 8
8@Component({ 9@Component({
9 selector: 'my-account-about', 10 selector: 'my-account-about',
@@ -12,19 +13,24 @@ import { Subscription } from 'rxjs'
12}) 13})
13export class AccountAboutComponent implements OnInit, OnDestroy { 14export class AccountAboutComponent implements OnInit, OnDestroy {
14 account: Account 15 account: Account
16 descriptionHTML = ''
15 17
16 private accountSub: Subscription 18 private accountSub: Subscription
17 19
18 constructor ( 20 constructor (
19 private route: ActivatedRoute, 21 private route: ActivatedRoute,
20 private i18n: I18n, 22 private i18n: I18n,
21 private accountService: AccountService 23 private accountService: AccountService,
24 private markdownService: MarkdownService
22 ) { } 25 ) { }
23 26
24 ngOnInit () { 27 ngOnInit () {
25 // Parent get the account for us 28 // Parent get the account for us
26 this.accountSub = this.accountService.accountLoaded 29 this.accountSub = this.accountService.accountLoaded
27 .subscribe(account => this.account = account) 30 .subscribe(account => {
31 this.account = account
32 this.descriptionHTML = this.markdownService.textMarkdownToHTML(this.account.description)
33 })
28 } 34 }
29 35
30 ngOnDestroy () { 36 ngOnDestroy () {
@@ -32,7 +38,7 @@ export class AccountAboutComponent implements OnInit, OnDestroy {
32 } 38 }
33 39
34 getAccountDescription () { 40 getAccountDescription () {
35 if (this.account.description) return this.account.description 41 if (this.descriptionHTML) return this.descriptionHTML
36 42
37 return this.i18n('No description') 43 return this.i18n('No description')
38 } 44 }