Show closing date in closed channel list
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
‎{{ seconds * 1000 | date: customFormat ?? 'yyyy-MM-dd HH:mm' }}
|
||||
<div class="lg-inline">
|
||||
<i class="symbol">(<app-time-since [time]="seconds" [fastRender]="true"></app-time-since>)</i>
|
||||
</div>
|
||||
<span *ngIf="seconds === undefined">-</span>
|
||||
<span *ngIf="seconds !== undefined">
|
||||
‎{{ seconds * 1000 | date: customFormat ?? 'yyyy-MM-dd HH:mm' }}
|
||||
<div class="lg-inline">
|
||||
<i class="symbol">(<app-time-since [time]="seconds" [fastRender]="true"></app-time-since>)</i>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
@@ -11,15 +11,13 @@ export class TimestampComponent implements OnChanges {
|
||||
@Input() dateString: string;
|
||||
@Input() customFormat: string;
|
||||
|
||||
seconds: number;
|
||||
|
||||
constructor() { }
|
||||
seconds: number | undefined = undefined;
|
||||
|
||||
ngOnChanges(): void {
|
||||
if (this.unixTime) {
|
||||
this.seconds = this.unixTime;
|
||||
} else if (this.dateString) {
|
||||
this.seconds = new Date(this.dateString).getTime() / 1000
|
||||
this.seconds = new Date(this.dateString).getTime() / 1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user