aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/account-about
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-25 16:56:13 +0200
committerChocobozzz <me@florianbigard.com>2018-04-25 16:56:13 +0200
commit170726f523ff48f89da45473fc53ca54784f43dd (patch)
treef9f783ebdfc934c6831396c2bf33f658d6640583 /client/src/app/+accounts/account-about
parentcc918ac3f45e32f031cce7b6e0473e5c2c34b8ae (diff)
downloadPeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.gz
PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.tar.zst
PeerTube-170726f523ff48f89da45473fc53ca54784f43dd.zip
Implement video channel views
Diffstat (limited to 'client/src/app/+accounts/account-about')
-rw-r--r--client/src/app/+accounts/account-about/account-about.component.html12
-rw-r--r--client/src/app/+accounts/account-about/account-about.component.scss8
-rw-r--r--client/src/app/+accounts/account-about/account-about.component.ts39
3 files changed, 59 insertions, 0 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
new file mode 100644
index 000000000..003a8045e
--- /dev/null
+++ b/client/src/app/+accounts/account-about/account-about.component.html
@@ -0,0 +1,12 @@
1<div *ngIf="account" class="row">
2 <div class="description col-md-6 col-sm-12">
3 <div class="small-title">Description</div>
4 <div class="content">{{ getAccountDescription() }}</div>
5 </div>
6
7 <div class="stats col-md-6 col-sm-12">
8 <div class="small-title">Stats</div>
9
10 <div class="content">Joined {{ account.createdAt | date }}</div>
11 </div>
12</div> \ No newline at end of file
diff --git a/client/src/app/+accounts/account-about/account-about.component.scss b/client/src/app/+accounts/account-about/account-about.component.scss
new file mode 100644
index 000000000..b1be7d4ed
--- /dev/null
+++ b/client/src/app/+accounts/account-about/account-about.component.scss
@@ -0,0 +1,8 @@
1@import '_variables';
2@import '_mixins';
3
4.small-title {
5 @include in-content-small-title;
6
7 margin-bottom: 20px;
8}
diff --git a/client/src/app/+accounts/account-about/account-about.component.ts b/client/src/app/+accounts/account-about/account-about.component.ts
new file mode 100644
index 000000000..8746875cb
--- /dev/null
+++ b/client/src/app/+accounts/account-about/account-about.component.ts
@@ -0,0 +1,39 @@
1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router'
3import { Location } from '@angular/common'
4import { getParameterByName, immutableAssign } from '@app/shared/misc/utils'
5import { NotificationsService } from 'angular2-notifications'
6import 'rxjs/add/observable/from'
7import 'rxjs/add/operator/concatAll'
8import { AuthService } from '../../core/auth'
9import { ConfirmService } from '../../core/confirm'
10import { AbstractVideoList } from '../../shared/video/abstract-video-list'
11import { VideoService } from '../../shared/video/video.service'
12import { Account } from '@app/shared/account/account.model'
13import { 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})
20export class AccountAboutComponent implements OnInit {
21 account: Account
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}