Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
smol ui tweaks (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminsampica authored May 20, 2022
1 parent e8dd0b1 commit 1b04a04
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/Client/Features/Fines/List.razor
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<AuthorizeView Roles=@RoleName.Admin>
<Authorized>
<MudTd DataLabel=Actions>
<MudIconButton Icon="@Icons.Material.Outlined.Approval" Color="Color.Info" Variant="Variant.Outlined" Size="Size.Small" OnClick="(e) => OpenManageFineDialog(fineItem.Id)" />
<MudIconButton Icon="@Icons.Material.Outlined.Approval" Color="Color.Primary" Variant="Variant.Outlined" Size="Size.Small" OnClick="(e) => OpenManageFineDialog(fineItem.Id)" />
</MudTd>
</Authorized>
</AuthorizeView>
Expand Down
96 changes: 53 additions & 43 deletions src/Client/Features/FreeAgents/Detail.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@page "/freeagents/{playerId:int}"

<Title>
@_title
</Title>

@if(_result is null)
{
<MudCard>
Expand All @@ -17,61 +21,67 @@
}
else
{
<Title>
@_title
</Title>

<MudCard>
<MudCardContent>
<MudGrid>
<MudItem md=3 xs=12 Class="d-flex flex-column align-center">
<MudAvatar Image=@_result.HeadShotUrl Size=Size.Large></MudAvatar>
<MudDivider Class="mt-2" Style="width: 100%; max-width:250px;"/>
<MudText Typo=Typo.h4>@_result.Name</MudText>
<MudItem lg=3 xs=12 Class="d-flex flex-column align-center">
<MudAvatar Image=@_result.HeadShotUrl Size=Size.Large />
<MudText Typo=Typo.h5 Align=Align.Center Color=Color.Tertiary>
ReallyLong NameGuySirMam
</MudText>
<MudText Typo=Typo.h6>Team Owner</MudText>
<MudText Typo=Typo.h6 Color=Color.Secondary>@_result.Team</MudText>
<MudText Typo=Typo.h6>Position</MudText>
<MudText Typo=Typo.h6 Color=Color.Secondary>@_result.Position</MudText>
<MudDivider Class="mt-2" Style="width: 100%; max-width:250px;"/>
<MudText Typo=Typo.h6 Color=Color.Warning Align=Align.Center>Bidding Ends on @_result.EndOfFreeAgency</MudText>
</MudItem>
<MudItem md=9 xs=12>
<MudText Typo=Typo.h6>Submit A New Bid</MudText>
<EditForm Model=_form OnValidSubmit=OnValidSubmitAsync>
<FluentValidationValidator Validator=_validator/>
<MudNumericField @bind-Value="_form.Amount" Label="Bid Amount" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.AttachMoney" HideSpinButtons="true" Class="mb-2" For="@(() => _form.Amount)"/>
<LoadingButton @bind-IsLoading="_processingForm"/>
</EditForm>
<MudText Typo=Typo.h6>
Bidding Ends on
</MudText>
<MudText Typo=Typo.h6 Color=Color.Warning Align=Align.Center>
@_result.EndOfFreeAgency
</MudText>
</MudItem>
<MudItem xs=12>
<MudText Typo=Typo.h6 Align=Align.Center>Bid History</MudText>
@if(_result.Bids.Any())
{
<MudTimeline>
@{
var firstBid = _result.Bids.First();
<MudItem lg=9 xs=12>
<MudGrid>
<MudItem xs=12>
<MudText Typo=Typo.h6>Submit A New Bid</MudText>
<EditForm Model=_form OnValidSubmit=OnValidSubmitAsync>
<FluentValidationValidator Validator=_validator/>
<MudNumericField @bind-Value="_form.Amount" Label="Bid Amount" Variant="Variant.Text" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.AttachMoney" HideSpinButtons="true" Class="mb-2" For="@(() => _form.Amount)"/>
<LoadingButton @bind-IsLoading="_processingForm"/>
</EditForm>
</MudItem>
<MudItem xs=12>
<MudText Typo=Typo.h6>Bid History</MudText>
@if(_result.Bids.Any())
{
<MudTimeline>
@{
var firstBid = _result.Bids.First();
}
<MudTimelineItem Icon=@Icons.Outlined.Money Size=Size.Large Color=Color.Success>
<MudAlert Severity="Severity.Success">
@firstBid!.Team is winning with a bid of <b>@firstBid.Amount</b> on @(firstBid.CreatedOn)!
</MudAlert>
</MudTimelineItem>
@foreach(var bid in _result.Bids.Skip(1))
{
<MudTimelineItem Icon=@Icons.Outlined.Money>
<ItemContent>
@bid!.Team bid @bid.Amount on @(bid.CreatedOn).
</ItemContent>
</MudTimelineItem>
}
</MudTimeline>
}
<MudTimelineItem Icon=@Icons.Outlined.Money Size=Size.Large Color=Color.Success>
<MudAlert Severity="Severity.Success">
@firstBid!.Team is winning with a bid of <b>@firstBid.Amount</b> on @(firstBid.CreatedOn)!
</MudAlert>
</MudTimelineItem>
@foreach(var bid in _result.Bids.Skip(1))
else
{
<MudTimelineItem Icon=@Icons.Outlined.Money>
<ItemContent>
@bid!.Team bid @bid.Amount on @(bid.CreatedOn).
</ItemContent>
</MudTimelineItem>
<MudAlert ShowCloseIcon=false Severity=Severity.Info>
There is currently no bid history to show for this player.
</MudAlert>
}
</MudTimeline>
}
else
{
<MudAlert ShowCloseIcon=false Severity=Severity.Info>
There is currently no bid history to show for this player.
</MudAlert>
}
</MudItem>
</MudGrid>
</MudItem>
</MudGrid>
</MudCardContent>
Expand Down

0 comments on commit 1b04a04

Please sign in to comment.