Skip to content
Snippets Groups Projects
Commit 4e35b74f authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch...

Merge branch '278-add-the-date-before-the-time-separated-with-a-pipe-character-and-for-desktop-users-only' into 'master'

Add date to comment timestamp

Closes #278

See merge request arsnova/frag.jetzt!253
parents d0c3887d 6f2e2e5e
Branches
Tags
No related merge requests found
......@@ -5,10 +5,12 @@
<div fxLayout="row" class="comment-actions">
<div class="date-container">
<div class="date" *ngIf="language === 'de'; else englishDate">
{{comment.timestamp | date: ' HH:mm '}}
{{deviceType === 'desktop' ? (comment.timestamp | date: ' dd.MM.yy | HH:mm ') :
(comment.timestamp | date: ' HH:mm ')}}
</div>
<ng-template class="date" #englishDate>
{{comment.timestamp | date: 'h:mm a'}}
{{deviceType === 'desktop' ? (comment.timestamp | date: ' M/d/yy | h:mm a ') :
(comment.timestamp | date: ' h:mm a ')}}
</ng-template>
</div>
<button mat-icon-button *ngIf="comment.read" [disabled]="true" (click)="setRead(comment)">
......
......@@ -56,6 +56,7 @@ export class CommentComponent implements OnInit {
hasVoted = 0;
language: string;
animationState: string;
deviceType: string;
constructor(protected authenticationService: AuthenticationService,
private route: ActivatedRoute,
......@@ -85,6 +86,7 @@ export class CommentComponent implements OnInit {
}
this.language = localStorage.getItem('currentLang');
this.translateService.use(this.language);
this.deviceType = localStorage.getItem('deviceType');
}
startAnimation(state_: any): void {
......
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