1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Show rating on the UI #69

This commit is contained in:
Patrik J. Braun 2021-05-11 16:24:46 +02:00
parent 8a0f663e37
commit 228811bac0
3 changed files with 17 additions and 1 deletions

View File

@ -11,7 +11,7 @@
}
.details-icon {
margin-top: 10px;
margin-top: .7rem;
font-size: x-large;
}

View File

@ -84,6 +84,17 @@
</div>
</div>
<div class="row" *ngIf="Rating">
<div class="col-2" title="rating" p18n-rating>
<span class="details-icon oi oi-star"></span>
</div>
<div class="col-10">
<div class="details-main mt-2" [title]="Rating + ' stars'">
<span *ngFor="let stars of [].constructor(Rating)" class="oi oi-star text-dark mr-1"></span>
<span *ngFor="let stars of [].constructor(5-Rating)" class="oi oi-star text-muted mr-1"></span>
</div>
</div>
</div>
<div class="row" *ngIf="keywords">
<div class="col-2">

View File

@ -50,6 +50,11 @@ export class InfoPanelLightboxComponent implements OnInit, OnChanges {
return (this.media as VideoDTO).metadata;
}
get Rating(): number {
return (this.media as PhotoDTO).metadata.rating;
}
get PositionData(): PositionMetaData {
return (this.media as PhotoDTO).metadata.positionData;
}