Add button in subscriptions to go to subscriptions list
This commit is contained in:
parent
366b21f13f
commit
13adf228d0
4 changed files with 36 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
min-width: 60px;
|
||||
margin-left: 5px;
|
||||
width: max-content;
|
||||
}
|
||||
}
|
||||
|
||||
.action-block {
|
||||
a button {
|
||||
@include peertube-button;
|
||||
@include grey-button;
|
||||
@include button-with-icon(18px, 3px, -1px);
|
||||
}
|
||||
}
|
||||
|
||||
.moderation-block {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue