Skip to content
Commits on Source (3)
......@@ -92,6 +92,7 @@ const routes: Routes = [
NewsfeedBoostRotatorComponent,
NewsfeedEntityComponent,
NewsfeedTilesComponent,
NewsfeedComponent,
],
entryComponents: [
NewsfeedComponent,
......
......@@ -14,7 +14,7 @@
<a [routerLink]="['/pro', channel.username, 'images']" routerLinkActive="active" i18n>Images</a>
<a [routerLink]="['/pro', channel.username, 'articles']" routerLinkActive="active" i18n>Articles</a>
<a [routerLink]="['/pro', channel.username, 'groups']" routerLinkActive="active" i18n>Groups</a>
<a [routerLink]="['/pro', channel.username, 'feed']" routerLinkActive="active" i18n>Feed</a>
<!-- <a [routerLink]="['/pro', channel.username, 'feed']" routerLinkActive="active" i18n>Feed</a>-->
<a [routerLink]="['/pro', channel.username, 'donate']" routerLinkActive="active">Donate</a>
<ng-container *ngIf="currentUser; else authLink">
......
......@@ -9,21 +9,25 @@
<div class="m-proChannelList__content">
<ul class="m-proChannelListContent__list">
<li *ngFor="let entity of (feedsService.feed | async)">
<li *ngFor="let entity of (feedsService.feed | async) as feed">
<ng-container *ngIf="type === 'images' || type === 'videos' || type === 'blogs'">
<m-pro--channel-tile
[entity]="entity | async"
></m-pro--channel-tile>
</ng-container>
<ng-container *ngIf="type === 'groups'">
<m-newsfeed__entity
[entity]="entity | async">
</m-newsfeed__entity>
</ng-container>
</li>
<li class="m-proChannelListContentList__seeMore" [routerLink]="['/', proService.currentChannel.username]">
See more
</li>
<li class="m-proChannelListContentList__seeMore" (click)="seeMore()">See more</li>
</ul>
<ng-container *ngIf="type === 'activities'">
<pre *ngFor="let entity of (feedsService.feed | async)">{{entity | async | json}}</pre>
<!-- talk to Emi about this -->
</ng-container>
<ng-container *ngIf="type === 'groups'">
<pre *ngFor="let entity of (feedsService.feed | async)">{{entity | async | json}}</pre>
<!-- TODO: see if we can use old tile, or create a new one based on the old one // use name, avatar and banner -->
</ng-container>
</div>
......@@ -38,6 +38,26 @@ m-pro--channel-list {
justify-content: center;
align-items: center;
m-newsfeed__entity {
width: 100%;
.m-groups--tile {
width: 100%;
h3, i {
color: #444 !important;
}
.m-groups--tile-block {
margin-top: 0;
}
.m-groups--tile-buttons {
padding: 0 $minds-padding * 2;
}
}
}
&.m-proChannelListContentList__seeMore {
color: white;
background-color: rgba(0, 0, 0, 0.7);
......@@ -66,7 +86,10 @@ m-pro--channel-list {
&:nth-child(2) {
grid-column: 3 / span 2;
margin-bottom: $minds-padding * 4;
justify-content: flex-end;
&:not(.m-proChannelListContentList__seeMore) {
justify-content: flex-end;
}
}
& > video {
......
......@@ -77,24 +77,6 @@ export class ProChannelListComponent implements OnInit {
this.feedsService.loadMore();
}
seeMore() {
let url = `${window.Minds.site_url}${this.proService.currentChannel.username}`;
let type = this.type;
if (this.type === 'feed') {
type = null;
}
else if (this.type === 'articles') {
type = 'blogs';
}
if (type) {
url += `/${type}`;
}
window.location.href = url;
}
detectChanges() {
this.cd.markForCheck();
this.cd.detectChanges();
......
......@@ -12,6 +12,7 @@ import { MindsFormsModule } from "../forms/forms.module";
import { ProChannelListComponent } from "./channel/list/list.component";
import { ProChannelDonateComponent } from './channel/donate/donate.component';
import { ProTileComponent } from "./channel/tile/tile.component";
import { NewsfeedModule } from "../newsfeed/newsfeed.module";
const routes: Routes = [
{
......@@ -39,6 +40,7 @@ const routes: Routes = [
CommonModule,
RouterModule.forChild(routes),
MindsFormsModule,
NewsfeedModule,
],
providers: [
ProService,
......