Add button in subscriptions to go to subscriptions list

This commit is contained in:
Rigel Kent 2020-01-07 12:12:39 +01:00
parent 366b21f13f
commit 13adf228d0
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
4 changed files with 36 additions and 7 deletions

View File

@ -4,9 +4,17 @@
<div placement="bottom" [ngbTooltip]="titleTooltip" container="body">
{{ titlePage }}
</div>
<my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed>
</div>
<my-feed *ngIf="titlePage" [syndicationItems]="syndicationItems"></my-feed>
<div class="action-block" *ngIf="actions.length > 0">
<a [routerLink]="action.routerLink" routerLinkActive="active" *ngFor="let action of actions">
<button class="btn">
<my-global-icon [iconName]="action.iconName"></my-global-icon>
<span i18n>{{ action.label }}</span>
</button>
</a>
</div>
<div class="moderation-block" *ngIf="displayModerationBlock">
<my-peertube-checkbox

View File

@ -3,17 +3,27 @@
.videos-header {
display: flex;
justify-content: space-between;
height: 80px;
align-items: center;
align-items: baseline;
.title-page.title-page-single {
margin: 0 5px 0 0;
display: flex;
my-feed {
display: inline-block;
top: 1px;
margin-left: 5px;
width: max-content;
}
}
my-feed {
display: inline-block;
top: 1px;
min-width: 60px;
.action-block {
a button {
@include peertube-button;
@include grey-button;
@include button-with-icon(18px, 3px, -1px);
}
}
.moderation-block {

View File

@ -59,6 +59,12 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor
blacklistInfo: false
}
actions: {
routerLink: string
iconName: string
label: string
}[] = []
onDataSubject = new Subject<any[]>()
protected serverConfig: ServerConfig

View File

@ -36,6 +36,11 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
super()
this.titlePage = i18n('Videos from your subscriptions')
this.actions.push({
routerLink: '/my-account/subscriptions',
label: i18n('Subscriptions'),
iconName: 'cog'
})
}
ngOnInit () {