Added MockUp Code for the PrivateEntity Cards
This commit is contained in:
@@ -1,10 +1,91 @@
|
|||||||
@using CouchLog.Data
|
@using CouchLog.Data
|
||||||
|
|
||||||
<MudContainer>
|
<MudCard Style="max-width: 500px; background-color: #2a2a2a; color: white;" Elevation="4">
|
||||||
<MudText Typo="Typo.h6">@PrivateEntity.GlobalEntity.Title</MudText>
|
<MudCardContent Class="pa-0">
|
||||||
</MudContainer>
|
<MudGrid Spacing="0">
|
||||||
|
<!-- Poster Image -->
|
||||||
|
<MudItem xs="4">
|
||||||
|
<MudImage
|
||||||
|
Src="@PrivateEntity.GlobalEntity.PicturePath"
|
||||||
|
Alt=""
|
||||||
|
ObjectFit="ObjectFit.Cover"
|
||||||
|
Style="width: 100%; height: 100%; min-height: 180px; border-radius: 4px 0 0 4px;" />
|
||||||
|
</MudItem>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<MudItem xs="8">
|
||||||
|
<MudStack Class="pa-3" Spacing="2">
|
||||||
|
<!-- Title Row with Menu -->
|
||||||
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||||
|
<MudText Typo="Typo.h6" Style="color: white; font-weight: 600;">@PrivateEntity.GlobalEntity.Title</MudText>
|
||||||
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Color="Color.Default" Dense="true">
|
||||||
|
<MudMenuItem>Bearbeiten</MudMenuItem>
|
||||||
|
<MudMenuItem>Entfernen</MudMenuItem>
|
||||||
|
</MudMenu>
|
||||||
|
</MudStack>
|
||||||
|
|
||||||
|
<!-- Date -->
|
||||||
|
<!-- <MudText Typo="Typo.caption" Style="color: #aaaaaa;">@Date.ToString("MM/dd/yyyy")</MudText> -->
|
||||||
|
|
||||||
|
<!-- Status Dropdown -->
|
||||||
|
<MudSelect
|
||||||
|
T="string"
|
||||||
|
@bind-Value="@PrivateEntity.UserWatchStatus!.Name"
|
||||||
|
Dense="true"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Style="background-color: #3a3a3a; color: white;"
|
||||||
|
Label="">
|
||||||
|
<!--@foreach (var status in )
|
||||||
|
{
|
||||||
|
<MudSelectItem Value="@status">@status</MudSelectItem>
|
||||||
|
}-->
|
||||||
|
</MudSelect>
|
||||||
|
|
||||||
|
<!-- Season Dropdown -->
|
||||||
|
<MudSelect
|
||||||
|
T="int?"
|
||||||
|
@bind-Value="@PrivateEntity.Season"
|
||||||
|
Dense="true"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Style="background-color: #3a3a3a; color: white;"
|
||||||
|
Label="">
|
||||||
|
<!-- @foreach (var season in SeasonOptions)
|
||||||
|
{
|
||||||
|
<MudSelectItem Value="@season">@season</MudSelectItem>
|
||||||
|
}-->
|
||||||
|
</MudSelect>
|
||||||
|
|
||||||
|
<!-- Episode Dropdown -->
|
||||||
|
<MudSelect
|
||||||
|
T="int?"
|
||||||
|
@bind-Value="@PrivateEntity.Episode"
|
||||||
|
Dense="true"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Style="background-color: #3a3a3a; color: white;"
|
||||||
|
Label="">
|
||||||
|
<!--@foreach (var episode in EpisodeOptions)
|
||||||
|
{
|
||||||
|
<MudSelectItem Value="@episode">@episode</MudSelectItem>
|
||||||
|
}-->
|
||||||
|
</MudSelect>
|
||||||
|
|
||||||
|
<!-- Details Button -->
|
||||||
|
<MudStack Row="true" Justify="Justify.FlexEnd">
|
||||||
|
<MudButton
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Size="Size.Small"
|
||||||
|
Style="color: #aaaaaa; border-color: #555555;">
|
||||||
|
Details
|
||||||
|
</MudButton>
|
||||||
|
</MudStack>
|
||||||
|
</MudStack>
|
||||||
|
</MudItem>
|
||||||
|
</MudGrid>
|
||||||
|
</MudCardContent>
|
||||||
|
</MudCard>
|
||||||
|
|
||||||
@code
|
@code
|
||||||
{
|
{
|
||||||
[Parameter] public PrivateEntity PrivateEntity { get; set; } = null!;
|
[Parameter] public PrivateEntity PrivateEntity { get; set; } = null!;
|
||||||
|
[Parameter] public List<UserWatchStatus> UserWatchStatuses { get; set; } = null!;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
@using Microsoft.AspNetCore.Identity
|
@using Microsoft.AspNetCore.Identity
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
|
||||||
@inject ApplicationDbContext CouchLogDB
|
@inject ApplicationDbContext CouchLogDb
|
||||||
@inject UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
if (_appUser != null)
|
if (_appUser != null)
|
||||||
{
|
{
|
||||||
_privateEntities = await CouchLogDB.PrivateEntities
|
_privateEntities = await CouchLogDb.PrivateEntities
|
||||||
.Where(x => x.UserId == _appUser.Id)
|
.Where(x => x.UserId == _appUser.Id)
|
||||||
.Include(x => x.GlobalEntity)
|
.Include(x => x.GlobalEntity)
|
||||||
.Include(x => x.UserWatchStatus)
|
.Include(x => x.UserWatchStatus)
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
.OrderByDescending(entity => entity.LastChange ?? entity.CreationTime)
|
.OrderByDescending(entity => entity.LastChange ?? entity.CreationTime)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
_userWatchStatuses = await CouchLogDB.UserWatchStatuses.OrderByDescending(entity => entity.Id).ToListAsync();
|
_userWatchStatuses = await CouchLogDb.UserWatchStatuses.OrderByDescending(entity => entity.Id).ToListAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user