mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-06 03:54:12 +02:00
fixing infobox error
This commit is contained in:
parent
0efd28c10f
commit
86402d229f
@ -27,12 +27,7 @@
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="details-main">
|
||||
<ng-container *ngIf="getYear() !== getCurrentYear()">
|
||||
{{ photo.metadata.creationDate | date :'longDate'}}
|
||||
</ng-container>
|
||||
<ng-container *ngIf="getYear() === getCurrentYear()">
|
||||
{{ photo.metadata.creationDate | date :'MMMM d'}}
|
||||
</ng-container>
|
||||
{{ photo.metadata.creationDate | date: (isThisYear() ? 'MMMM d': 'longDate')}}
|
||||
</div>
|
||||
<div class="details-sub row">
|
||||
<div class="col-12">{{ photo.metadata.creationDate | date :'EEEE'}}, {{getTime()}}</div>
|
||||
|
@ -31,8 +31,9 @@ export class InfoPanelLightboxComponent {
|
||||
return size.toFixed(2) + postFixes[index];
|
||||
}
|
||||
|
||||
getCurrentYear() {
|
||||
return (new Date()).getFullYear();
|
||||
isThisYear() {
|
||||
return (new Date()).getFullYear() ===
|
||||
(new Date(this.photo.metadata.creationDate)).getFullYear();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user