diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-07 12:12:39 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-01-07 12:12:43 +0100 |
commit | 13adf228d0cc48995cf70c0a782a1d717873f6e0 (patch) | |
tree | b4b8ef5ac8ae67ba5336fba8420ba4d97c0c0eef | |
parent | 366b21f13f75b33f9d64744d7564e7cddf5b1ae8 (diff) | |
download | PeerTube-13adf228d0cc48995cf70c0a782a1d717873f6e0.tar.gz PeerTube-13adf228d0cc48995cf70c0a782a1d717873f6e0.tar.zst PeerTube-13adf228d0cc48995cf70c0a782a1d717873f6e0.zip |
Add button in subscriptions to go to subscriptions list
4 files changed, 36 insertions, 7 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.html b/client/src/app/shared/video/abstract-video-list.html index 13aedcc74..3abc4312f 100644 --- a/client/src/app/shared/video/abstract-video-list.html +++ b/client/src/app/shared/video/abstract-video-list.html | |||
@@ -4,9 +4,17 @@ | |||
4 | <div placement="bottom" [ngbTooltip]="titleTooltip" container="body"> | 4 | <div placement="bottom" [ngbTooltip]="titleTooltip" container="body"> |
5 | {{ titlePage }} | 5 | {{ titlePage }} |
6 | </div> | 6 | </div> |
7 | <my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed> | ||
7 | </div> | 8 | </div> |
8 | 9 | ||
9 | <my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed> | 10 | <div class="action-block" *ngIf="actions.length > 0"> |
11 | <a [routerLink]="action.routerLink" routerLinkActive="active" *ngFor="let action of actions"> | ||
12 | <button class="btn"> | ||
13 | <my-global-icon [iconName]="action.iconName"></my-global-icon> | ||
14 | <span i18n>{{ action.label }}</span> | ||
15 | </button> | ||
16 | </a> | ||
17 | </div> | ||
10 | 18 | ||
11 | <div class="moderation-block" *ngIf="displayModerationBlock"> | 19 | <div class="moderation-block" *ngIf="displayModerationBlock"> |
12 | <my-peertube-checkbox | 20 | <my-peertube-checkbox |
diff --git a/client/src/app/shared/video/abstract-video-list.scss b/client/src/app/shared/video/abstract-video-list.scss index 98b80fdfd..3c7a4b1fc 100644 --- a/client/src/app/shared/video/abstract-video-list.scss +++ b/client/src/app/shared/video/abstract-video-list.scss | |||
@@ -3,17 +3,27 @@ | |||
3 | 3 | ||
4 | .videos-header { | 4 | .videos-header { |
5 | display: flex; | 5 | display: flex; |
6 | justify-content: space-between; | ||
6 | height: 80px; | 7 | height: 80px; |
7 | align-items: center; | 8 | align-items: baseline; |
8 | 9 | ||
9 | .title-page.title-page-single { | 10 | .title-page.title-page-single { |
10 | margin: 0 5px 0 0; | 11 | display: flex; |
12 | |||
13 | my-feed { | ||
14 | display: inline-block; | ||
15 | top: 1px; | ||
16 | margin-left: 5px; | ||
17 | width: max-content; | ||
18 | } | ||
11 | } | 19 | } |
12 | 20 | ||
13 | my-feed { | 21 | .action-block { |
14 | display: inline-block; | 22 | a button { |
15 | top: 1px; | 23 | @include peertube-button; |
16 | min-width: 60px; | 24 | @include grey-button; |
25 | @include button-with-icon(18px, 3px, -1px); | ||
26 | } | ||
17 | } | 27 | } |
18 | 28 | ||
19 | .moderation-block { | 29 | .moderation-block { |
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 3e3583a70..06d4ed43d 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -59,6 +59,12 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
59 | blacklistInfo: false | 59 | blacklistInfo: false |
60 | } | 60 | } |
61 | 61 | ||
62 | actions: { | ||
63 | routerLink: string | ||
64 | iconName: string | ||
65 | label: string | ||
66 | }[] = [] | ||
67 | |||
62 | onDataSubject = new Subject<any[]>() | 68 | onDataSubject = new Subject<any[]>() |
63 | 69 | ||
64 | protected serverConfig: ServerConfig | 70 | protected serverConfig: ServerConfig |
diff --git a/client/src/app/videos/video-list/video-user-subscriptions.component.ts b/client/src/app/videos/video-list/video-user-subscriptions.component.ts index b36c85766..0cd67db29 100644 --- a/client/src/app/videos/video-list/video-user-subscriptions.component.ts +++ b/client/src/app/videos/video-list/video-user-subscriptions.component.ts | |||
@@ -36,6 +36,11 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement | |||
36 | super() | 36 | super() |
37 | 37 | ||
38 | this.titlePage = i18n('Videos from your subscriptions') | 38 | this.titlePage = i18n('Videos from your subscriptions') |
39 | this.actions.push({ | ||
40 | routerLink: '/my-account/subscriptions', | ||
41 | label: i18n('Subscriptions'), | ||
42 | iconName: 'cog' | ||
43 | }) | ||
39 | } | 44 | } |
40 | 45 | ||
41 | ngOnInit () { | 46 | ngOnInit () { |