mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 11:14:27 +00:00
Add details page for GD-ROM swap-trick capabilities with data display
This commit is contained in:
1128
Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor
Normal file
1128
Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor
Normal file
File diff suppressed because it is too large
Load Diff
26
Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor.cs
Normal file
26
Aaru.Server/Components/Admin/Pages/Gdrom/Details.razor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Components.Admin.Pages.Gdrom;
|
||||
|
||||
public partial class Details
|
||||
{
|
||||
bool _initialized;
|
||||
GdRomSwapDiscCapabilities? _model;
|
||||
[Parameter]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
await using DbContext ctx = await DbContextFactory.CreateDbContextAsync();
|
||||
|
||||
_model = await ctx.GdRomSwapDiscCapabilities.FirstOrDefaultAsync(m => m.Id == Id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user