]>
Commit | Line | Data |
---|---|---|
0626e7af C |
1 | import { Component, OnDestroy, OnInit } from '@angular/core' |
2 | import { ActivatedRoute, Router } from '@angular/router' | |
3 | import { Location } from '@angular/common' | |
4 | import { getParameterByName, immutableAssign } from '@app/shared/misc/utils' | |
5 | import { NotificationsService } from 'angular2-notifications' | |
6 | import 'rxjs/add/observable/from' | |
7 | import 'rxjs/add/operator/concatAll' | |
8 | import { AuthService } from '../../core/auth' | |
9 | import { ConfirmService } from '../../core/confirm' | |
10 | import { AbstractVideoList } from '../../shared/video/abstract-video-list' | |
11 | import { VideoService } from '../../shared/video/video.service' | |
12 | import { Account } from '@app/shared/account/account.model' | |
13 | import { 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 | }) | |
20 | export 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 | } |