...
 
Commits (2)
......@@ -19,6 +19,7 @@ import { ImageCard } from '../../../modules/legacy/components/cards/object/image
import { VideoCard } from '../../../modules/legacy/components/cards/object/video/video';
import { AlbumCard } from '../../../modules/legacy/components/cards/object/album/album';
import { BlogCard } from '../../../modules/blogs/card/card';
import { CommentComponentV2 } from "../../../modules/comments/comment/comment.component";
@Component({
selector: 'minds-card',
......@@ -100,6 +101,8 @@ export class MindsCard implements AfterViewInit {
return BlogCard;
} else if (object.subtype === 'album') {
return AlbumCard;
} else if (object.type === 'comment') {
return CommentComponentV2;
}
return null;
......@@ -134,6 +137,11 @@ export class MindsCard implements AfterViewInit {
(<GroupsCard>this.componentInstance).group = this.object;
} else if (this.object.subtype === 'blog') {
(<BlogCard>this.componentInstance)._blog = this.object;
} else if (this.object.type === 'comment') {
const commentComp: CommentComponentV2 = <CommentComponentV2>this.componentInstance;
commentComp.comment = this.object;
commentComp.canEdit = false;
commentComp.hideToolbar = this.flags.hideTabs || true;
} else {
this.componentInstance.object = this.object;
......
......@@ -224,7 +224,7 @@
<div class="m-comment__toolbar" *ngIf="comment?.guid">
<div class="m-commentToolbar__buttons" [hidden]="editing">
<div class="m-commentToolbar__buttons" [hidden]="editing || hideToolbar">
<minds-button-thumbs-up [object]="comment" [class.has-count]="comment['thumbs:up:count'] > 0"></minds-button-thumbs-up>
<minds-button-thumbs-down [object]="comment"></minds-button-thumbs-down>
<span class="m-clickable"
......
......@@ -75,6 +75,7 @@ export class CommentComponentV2 implements OnChanges {
commentAge$: Observable<number>;
@Input() canEdit: boolean = false;
@Input() canDelete: boolean = false;
@Input() hideToolbar: boolean = false;
@Output() onReply = new EventEmitter();
......
......@@ -38,6 +38,7 @@ import { HovercardPopup } from './components/hovercard-popup/hovercard-popup';
import { CarouselComponent } from './components/carousel.component';
import { CommentsModule } from '../comments/comments.module';
import { TextInputAutocompleteModule } from 'angular-text-input-autocomplete';
import { CommentComponentV2 } from "../comments/comment/comment.component";
@NgModule({
imports: [
......@@ -114,6 +115,7 @@ import { TextInputAutocompleteModule } from 'angular-text-input-autocomplete';
Remind,
UserCard,
BoostButton,
CommentComponentV2,
]
})
export class LegacyModule {
......
......@@ -3,7 +3,12 @@
<b>{{ appeal.time_created * 1000 | date: 'short' }}</b>
<p>
<strong>Action taken:</strong>
<span> This post has been</span>
<span>
This
<ng-container *ngIf="appeal.report.entity.type !== 'comment'"> post </ng-container>
<ng-container *ngIf="appeal.report.entity.type == 'comment'"> comment </ng-container>
has been
</span>
<b> {{ service.getAction(appeal.report) }} </b>
<span>for</span>
<b> {{ service.getReasonString(appeal.report) }} </b>
......@@ -39,17 +44,18 @@
hostClass="mdl-card"
></minds-card>
<div *ngIf="appeal.entityObj && appeal.entityObj.type == 'comment'" class="m-comment-wrapper">
<div *ngIf="appeal.report.entity && appeal.report.entity.type == 'comment'" class="m-comment-wrapper">
<div class="m-moderationAppeal__commentNote">
<a target="_blank"
[routerLink]="['/newsfeed', appeal.entityObj.parent_guid]"
[routerLink]="['/newsfeed', appeal.report.entity.entity_guid]"
[queryParams]="{ focusedCommentUrn: appeal.report.entity_urn }"
i18n="@@M__COMMON__VIEW_PARENT_COMMENT_THREAD"
>
View parent and its comment thread
</a>
</div>
<minds-card-comment
[object]="appeal.entityObj"
[object]="appeal.report.entity"
class="mdl-card"
>
</minds-card-comment>
......
......@@ -18,6 +18,7 @@
<minds-card *ngIf="report.entity"
class=""
[object]="report.entity"
[flags]="{hideToolbar: true}"
hostClass="mdl-card m-border"
></minds-card>
</ng-container>
......
......@@ -30,6 +30,10 @@
margin-top: 16px;
max-width: 600px;
m-comment {
max-width: initial !important;
}
.m-mature-thumbnail-overlay {
display: none !important;
}
......