Commit 5230e5d6 authored by Marcelo Rivera's avatar Marcelo Rivera

(feat): modal for Emi

1 merge request!459WIP: (feat): Minds Pro
Pipeline #74812921 running with stages
......@@ -24,6 +24,7 @@ import { MediaViewRecommendedComponent } from './view/recommended/recommended.co
import { ThumbnailSelectorComponent } from './components/thumbnail-selector.component';
import { CommentsModule } from '../comments/comments.module';
import { HashtagsModule } from '../hashtags/hashtags.module';
import { ProContentModalComponent } from "../pro/channel/content-modal/modal.component";
const routes: Routes = [
{ path: 'media/videos/:filter', component: MediaVideosListComponent },
......@@ -74,6 +75,7 @@ const routes: Routes = [
MediaImagesListComponent,
MediaEditComponent,
MediaViewComponent,
ProContentModalComponent,
]
})
......
hola
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'm-pro--content-modal',
templateUrl: 'modal.component.html'
})
export class ProContentModalComponent implements OnInit {
entity: string; // feed type
@Input('entity') set data(data) {
this.entity = data;
}
constructor() {
}
ngOnInit() {
}
}
......@@ -29,6 +29,7 @@
<ng-container *ngIf="type === 'images' || type === 'videos' || type === 'blogs'">
<m-pro--channel-tile
[entity]="entity"
(click)="openModal()"
></m-pro--channel-tile>
</ng-container>
<ng-container *ngIf="type === 'groups'">
......@@ -40,9 +41,9 @@
<ng-container *ngIf="type === 'activities'">
<minds-activity
[object]="entity">
</minds-activity>
[object]="entity"
(click)="openModal()"
></minds-activity>
</ng-container>
<li
class="m-proChannelListContentList__seeMore"
......
......@@ -4,6 +4,8 @@ import { Subscription } from "rxjs";
import { FeedsService } from "../../../../common/services/feeds.service";
import { ProChannelService } from '../channel.service';
import { first } from "rxjs/operators";
import { OverlayModalService } from "../../../../services/ux/overlay-modal";
import { ProContentModalComponent } from "../content-modal/modal.component";
@Component({
selector: 'm-pro--channel-list',
......@@ -28,6 +30,7 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
constructor(
public feedsService: FeedsService,
protected modalService: OverlayModalService,
protected channelService: ProChannelService,
protected route: ActivatedRoute,
protected router: Router,
......@@ -161,4 +164,12 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
}
return routeType;
}
openModal() {
this.modalService.create(ProContentModalComponent, {type: this.type}, {
class: 'm-overlayModal--media'
}).present();
}
}
......@@ -18,6 +18,7 @@ import { ProUserMenuComponent } from "./channel/pro-user-menu/pro-user-menu.comp
import { ProChannelFooterComponent } from './channel/footer/footer.component';
import { LegacyModule } from "../legacy/legacy.module";
import { WireModule } from "../wire/wire.module";
import { ProContentModalComponent } from "./channel/content-modal/modal.component";
const routes: Routes = [
{
......@@ -78,6 +79,7 @@ const routes: Routes = [
ProSettingsComponent,
ProSubscriptionComponent,
ProTileComponent,
ProContentModalComponent,
ProChannelComponent,
ProChannelSignupComponent,
ProChannelListComponent,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment