aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-21 09:35:23 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-21 09:35:23 +0100
commitaa0f19635ae4632e286de1599fc24f95f32a108c (patch)
tree347518feb2534da9466b169a48a6cead0e1f2999 /client/src/app/+accounts
parenta56053a2a49431aeddcf8bcdd804b2e0abb93621 (diff)
downloadPeerTube-aa0f19635ae4632e286de1599fc24f95f32a108c.tar.gz
PeerTube-aa0f19635ae4632e286de1599fc24f95f32a108c.tar.zst
PeerTube-aa0f19635ae4632e286de1599fc24f95f32a108c.zip
Add manage buttons for own channels and account, video counts (#2421)
* Add manage buttons for own channels and account, video counts * Change manage button color and introduce secondary color
Diffstat (limited to 'client/src/app/+accounts')
-rw-r--r--client/src/app/+accounts/accounts.component.html8
-rw-r--r--client/src/app/+accounts/accounts.component.scss13
-rw-r--r--client/src/app/+accounts/accounts.component.ts5
3 files changed, 22 insertions, 4 deletions
diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html
index 57498e98c..367258a06 100644
--- a/client/src/app/+accounts/accounts.component.html
+++ b/client/src/app/+accounts/accounts.component.html
@@ -25,15 +25,17 @@
25 <my-user-moderation-dropdown 25 <my-user-moderation-dropdown
26 buttonSize="small" [account]="account" [user]="user" placement="bottom-right auto" 26 buttonSize="small" [account]="account" [user]="user" placement="bottom-right auto"
27 (userChanged)="onUserChanged()" (userDeleted)="onUserDeleted()" 27 (userChanged)="onUserChanged()" (userDeleted)="onUserDeleted()"
28 > 28 ></my-user-moderation-dropdown>
29 </my-user-moderation-dropdown>
30 </div> 29 </div>
31 <div class="actor-followers" i18n-title [title]="subscribersDisplayFor(account.followersCount) + ' to the account actor'"> 30 <div class="actor-followers" i18n-title [title]="subscribersDisplayFor(account.followersCount) + ' to the account actor'">
32 {{ subscribersDisplayFor(naiveAggregatedSubscribers) }} 31 {{ subscribersDisplayFor(naiveAggregatedSubscribers) }}
33 </div> 32 </div>
34 </div> 33 </div>
35 34
36 <my-subscribe-button *ngIf="videoChannels" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button> 35 <div class="right-buttons">
36 <a *ngIf="isManageable" routerLink="/my-account" class="btn btn-outline-tertiary mr-2" i18n>Manage</a>
37 <my-subscribe-button *ngIf="videoChannels" [account]="account" [videoChannels]="videoChannels"></my-subscribe-button>
38 </div>
37 </div> 39 </div>
38 40
39 <div class="links"> 41 <div class="links">
diff --git a/client/src/app/+accounts/accounts.component.scss b/client/src/app/+accounts/accounts.component.scss
index ab3aece54..a06f04055 100644
--- a/client/src/app/+accounts/accounts.component.scss
+++ b/client/src/app/+accounts/accounts.component.scss
@@ -9,10 +9,21 @@
9 } 9 }
10} 10}
11 11
12my-subscribe-button { 12.right-buttons {
13 display: flex;
13 height: max-content; 14 height: max-content;
14 margin-left: auto; 15 margin-left: auto;
15 margin-top: 20px; 16 margin-top: 20px;
17
18 a {
19 @include peertube-button-outline;
20 height: auto;
21 line-height: 32px;
22 }
23
24 my-subscribe-button {
25 height: min-content;
26 }
16} 27}
17 28
18my-user-moderation-dropdown, 29my-user-moderation-dropdown,
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index da4a0b28e..3d486f084 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -65,6 +65,11 @@ export class AccountsComponent implements OnInit, OnDestroy {
65 ) 65 )
66 } 66 }
67 67
68 get isManageable () {
69 if (!this.authService.isLoggedIn()) return false
70 return this.user.id === this.authService.getUser().id
71 }
72
68 onUserChanged () { 73 onUserChanged () {
69 this.getUserIfNeeded(this.account) 74 this.getUserIfNeeded(this.account)
70 } 75 }