...
 
Commits (2)
......@@ -29,7 +29,7 @@
<ng-container *ngIf="type === 'images' || type === 'videos' || type === 'blogs'">
<m-pro--channel-tile
[entity]="entity"
(click)="openModal(entity)"
(click)="onTileClicked(entity)"
></m-pro--channel-tile>
</ng-container>
<ng-container *ngIf="type === 'groups'">
......@@ -42,7 +42,7 @@
<ng-container *ngIf="type === 'activities'">
<minds-activity
[object]="entity"
(click)="openModal(entity)"
(click)="onTileClicked(entity)"
></minds-activity>
</ng-container>
<li
......
......@@ -87,7 +87,7 @@ m-pro--channel-list {
ul.m-proChannelListContent__list {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: minmax(300px, auto);
grid-auto-rows: minmax(220px, auto);
grid-gap: 32px 32px;
list-style: none;
padding: 0;
......
......@@ -170,15 +170,21 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
return routeType;
}
openModal(entity: any) {
if (entity.subtype !== 'video' && entity.subtype !== 'image') {
return;
onTileClicked(entity: any) {
switch (this.getType(entity)) {
case 'object:blog':
window.open(`${window.Minds.site_url}${entity.route}/`, '_blank');
break;
case 'object:image':
case 'object:video':
this.modalService.create(ProContentModalComponent, entity, {
class: 'm-overlayModal--media'
}).present();
break;
}
}
this.modalService.create(ProContentModalComponent, entity, {
class: 'm-overlayModal--media'
}).present();
private getType(entity: any) {
return entity.type === 'object' ? `${entity.type}:${entity.subtype}` : entity.type;
}
}
ul.m-proChannelListContent__list li:nth-child(n+3) m-pro--channel-tile {
height: 300px!important;
height: 220px!important;
& > img {
height: 100%!important;
......