52 lines
2.4 KiB
Plaintext
52 lines
2.4 KiB
Plaintext
@using WatchIt.Common.Model.Roles
|
|
@typeparam TRole where TRole : WatchIt.Common.Model.Roles.IRoleResponse
|
|
|
|
<div class="container-grid">
|
|
<div class="row">
|
|
<div class="col-auto">
|
|
<a class="text-reset text-decoration-none" href="/person/@(Role.PersonId)">
|
|
<PictureComponent Picture="@(_picture)" Placeholder="/assets/person_poster.png" AlternativeText="poster" Height="110"/>
|
|
</a>
|
|
</div>
|
|
<div class="col">
|
|
<div class="d-flex align-items-start flex-column h-100">
|
|
<div class="mb-auto">
|
|
<span id="nameText">
|
|
@if (_person is null)
|
|
{
|
|
<span>Loading...</span>
|
|
}
|
|
else
|
|
{
|
|
<a class="text-reset text-decoration-none" href="/person/@(Role.PersonId)">
|
|
<strong>@(_person.Name)</strong>@(Role is ActorRoleResponse actor ? $" as {actor.Name}" : string.Empty)
|
|
</a>
|
|
}
|
|
</span>
|
|
</div>
|
|
<div class="d-inline-flex gap-3">
|
|
<div class="vstack gap-2">
|
|
<span id="ratingNameText">Global rating:</span>
|
|
<DisplayRatingComponent Rating="_globalRating"
|
|
EmptyMode="DisplayRatingComponent.DisplayRatingComponentEmptyMode.DoubleDash"
|
|
Scale="0.85"/>
|
|
</div>
|
|
<div class="vr"></div>
|
|
<div class="vstack gap-2">
|
|
<span id="ratingNameText">Your rating:</span>
|
|
<div class="d-inline-flex align-items-center h-100">
|
|
@if (_user is not null)
|
|
{
|
|
<Rating Color="Color.Light" MaxValue="10" @bind-SelectedValue="@(_yourRating)" @onclick="@(RatingChanged)"/>
|
|
}
|
|
else
|
|
{
|
|
<span id="ratingLoginInfoText">You must be logged in to rate the role</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |