fix flagging

This commit is contained in:
_Bastler 2021-10-07 14:35:09 +02:00
parent da2ec818ac
commit a565506085
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,6 @@
<div class="comment">
<div mat-line>
<mat-icon color="warn" *ngIf="comment.flaggedStatus == 'FLAGGED'">outlined_flag</mat-icon>
<small>
<ng-container *ngIf="comment.metadata && !comment.metadata.unvote">
<a href="javascript:" (click)="voteUp(comment.id)" matTooltip="{{'vote.up' | i18n}}">
@ -27,11 +28,12 @@
routerLink="/e/{{comment.target}}">{{comment.metadata.entry || 'entry'}}</a></span>
<span *ngIf="comment.metadata && comment.metadata.unvote"> | </span>
<a *ngIf="comment.metadata.unvote" href="javascript:" (click)="unvote()">{{'comment.unvote' | i18n}}</a>
<span> | </span>
<span *ngIf="comment.metadata && comment.metadata.flag"> | </span>
<a *ngIf="comment.metadata && comment.metadata.flag" href="javascript:" (click)="flag(comment.id)" matTooltip="{{'comment.flag' |
i18n}}">
<mat-icon inline="true">outlined_flag</mat-icon>
</a>
<span *ngIf="comment.metadata && comment.metadata.unflag"> | </span>
<a *ngIf="comment.metadata && comment.metadata.unflag" href="javascript:" (click)="unflag(comment.id)"
matTooletip="{{'comment.unflag' |
i18n}}">
@ -50,8 +52,9 @@
<span *ngIf="canEdit()"> | </span>
<a *ngIf="canEdit()" href="javascript:" (click)="edit()">{{'comment.edit' | i18n}}</a>
<ng-container *ngIf="moderator">
<span *ngIf="comment.flaggedStatus == 'FLAGGED'"> | </span>
<a *ngIf="comment.flaggedStatus == 'FLAGGED'" href="javascript:" (click)="modUnflagComment()">{{'moderation.comment.unflag' |
<span *ngIf="comment.metadata.flagged"> | </span>
<a *ngIf="comment.metadata.flagged" href="javascript:"
(click)="modUnflagComment()">{{'moderation.comment.unflag' |
i18n}}</a>
<span> | </span>
<a href="javascript:" (click)="modDeleteComment(comment)">{{'moderation.comment.delete' |

View File

@ -1,4 +1,5 @@
<div mat-line>
<mat-icon color="warn" *ngIf="entry.flaggedStatus == 'FLAGGED'">outlined_flag</mat-icon>
<span *ngIf="index">{{index}}.&nbsp;</span>
<mat-icon inline="true">{{'entryType.' + entry.entryType + '.icon' | i18n}}</mat-icon>
<a class="title" *ngIf="entry.url" [href]="entry.url" target="_blank">{{entry.title}}</a>
@ -54,8 +55,8 @@
<mat-icon inline="true">flag</mat-icon>
</a>
<ng-container *ngIf="moderator">
<span *ngIf="entry.flaggedStatus == 'FLAGGED'"> | </span>
<a *ngIf="entry.flaggedStatus == 'FLAGGED'" href="javascript:"
<span *ngIf="entry.metadata.flagged"> | </span>
<a *ngIf="entry.metadata.flagged" href="javascript:"
(click)="modUnflagEntry()">{{'moderation.entry.unflag' | i18n}}</a>
<span> | </span>
<a href="javascript:" (click)="modDeleteEntry()">{{'moderation.entry.delete' | i18n}}</a>