diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-21 09:35:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-01-21 09:35:23 +0100 |
commit | aa0f19635ae4632e286de1599fc24f95f32a108c (patch) | |
tree | 347518feb2534da9466b169a48a6cead0e1f2999 /client/src/app/+video-channels | |
parent | a56053a2a49431aeddcf8bcdd804b2e0abb93621 (diff) | |
download | PeerTube-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/+video-channels')
3 files changed, 25 insertions, 1 deletions
diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index f4b944c59..8ab79526d 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html | |||
@@ -15,7 +15,10 @@ | |||
15 | </button> | 15 | </button> |
16 | </div> | 16 | </div> |
17 | 17 | ||
18 | <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button> | 18 | <div class="right-buttons"> |
19 | <a *ngIf="isManageable" [routerLink]="[ '/my-account/video-channels/update', videoChannel.nameWithHost ]" class="btn btn-outline-tertiary mr-2" i18n>Manage</a> | ||
20 | <my-subscribe-button #subscribeButton [videoChannels]="[videoChannel]"></my-subscribe-button> | ||
21 | </div> | ||
19 | </div> | 22 | </div> |
20 | <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> | 23 | <div i18n class="actor-followers">{{ videoChannel.followersCount }} subscribers</div> |
21 | 24 | ||
diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss index d29575027..50b69e7ac 100644 --- a/client/src/app/+video-channels/video-channels.component.scss +++ b/client/src/app/+video-channels/video-channels.component.scss | |||
@@ -17,4 +17,20 @@ | |||
17 | margin-top: -2px; | 17 | margin-top: -2px; |
18 | } | 18 | } |
19 | } | 19 | } |
20 | } | ||
21 | |||
22 | .right-buttons { | ||
23 | display: flex; | ||
24 | height: max-content; | ||
25 | margin-left: auto; | ||
26 | margin-top: 20px; | ||
27 | |||
28 | a { | ||
29 | @include peertube-button-outline; | ||
30 | line-height: 1.8; | ||
31 | } | ||
32 | |||
33 | my-subscribe-button { | ||
34 | height: min-content; | ||
35 | } | ||
20 | } \ No newline at end of file | 36 | } \ No newline at end of file |
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 5ef46c58a..493a6d499 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts | |||
@@ -64,6 +64,11 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { | |||
64 | return this.authService.isLoggedIn() | 64 | return this.authService.isLoggedIn() |
65 | } | 65 | } |
66 | 66 | ||
67 | get isManageable () { | ||
68 | if (!this.isUserLoggedIn()) return false | ||
69 | return this.videoChannel.ownerAccount.userId === this.authService.getUser().id | ||
70 | } | ||
71 | |||
67 | activateCopiedMessage () { | 72 | activateCopiedMessage () { |
68 | this.notifier.success(this.i18n('Username copied')) | 73 | this.notifier.success(this.i18n('Username copied')) |
69 | } | 74 | } |