mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add SecureDigital to device report view.
This commit is contained in:
@@ -490,6 +490,19 @@
|
||||
</AccordionBody>
|
||||
</AccordionItem>
|
||||
}
|
||||
@if(Scr != null)
|
||||
{
|
||||
<AccordionItem>
|
||||
<AccordionHeader>
|
||||
<Heading Size="HeadingSize.Is5">
|
||||
<AccordionToggle>Card configuration register</AccordionToggle>
|
||||
</Heading>
|
||||
</AccordionHeader>
|
||||
<AccordionBody>
|
||||
@((MarkupString)Scr)
|
||||
</AccordionBody>
|
||||
</AccordionItem>
|
||||
}
|
||||
@if(Ocr != null)
|
||||
{
|
||||
<AccordionItem>
|
||||
|
||||
@@ -47,6 +47,7 @@ public partial class View
|
||||
public string? ExtendedCsd { get; set; }
|
||||
public string? Csd { get; set; }
|
||||
public string? Cid { get; set; }
|
||||
public string? Scr { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override async Task OnInitializedAsync()
|
||||
@@ -71,6 +72,7 @@ public partial class View
|
||||
.Include(static deviceReportV2 => deviceReportV2.ATAPI)
|
||||
.Include(static deviceReportV2 => deviceReportV2.ATA)
|
||||
.Include(static deviceReportV2 => deviceReportV2.MultiMediaCard)
|
||||
.Include(static deviceReportV2 => deviceReportV2.SecureDigital)
|
||||
.FirstOrDefaultAsync(d => d.Id == Id);
|
||||
|
||||
if(report is null)
|
||||
@@ -323,6 +325,32 @@ public partial class View
|
||||
Ocr = Decoders.MMC.Decoders.PrettifyCSD(report.MultiMediaCard.OCR).Replace("\n", "<br/>");
|
||||
}
|
||||
|
||||
if(report.SecureDigital != null)
|
||||
{
|
||||
lblDeviceType = "SecureDigital";
|
||||
|
||||
if(report.SecureDigital.CID != null)
|
||||
{
|
||||
Cid = Decoders.SecureDigital.Decoders.PrettifyCID(report.SecureDigital.CID).Replace("\n", "<br/>");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.CSD != null)
|
||||
{
|
||||
Csd = Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.CSD).Replace("\n", "<br/>");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.SCR != null)
|
||||
{
|
||||
Scr = Decoders.SecureDigital.Decoders.PrettifySCR(report.SecureDigital.SCR).Replace("\n", "<br/>");
|
||||
}
|
||||
|
||||
if(report.SecureDigital.OCR != null)
|
||||
{
|
||||
Ocr = Decoders.SecureDigital.Decoders.PrettifyCSD(report.SecureDigital.OCR).Replace("\n", "<br/>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_initialized = true;
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
Reference in New Issue
Block a user