This commit is contained in:
2026-05-17 20:54:09 -04:00
parent 6da2183583
commit 74c21ee5cc
3000 changed files with 11794 additions and 15301 deletions

View File

@@ -0,0 +1,28 @@
@namespace OpenArchival.Blazor.FileViewer
@implements IFileViewer
@using Microsoft.JSInterop
@using MudBlazor
@using OpenArchival.DataAccess
@inject IJSRuntime JSRuntime
<div style="width:100%; height: 1100px; max-height: 80vh; border: 1px solid var(--mud-palette-divider); border-radius: 4px; overflow: hidden; box-sizing: border-box;">
<iframe src="@($"/api/files/{File.Id}")" style="width:100%; height:100%; border: none; display: block;" title="@File.OriginalName"></iframe>
</div>
@code {
[Parameter]
public required FilePathListing File { get; set; }
[Parameter]
public EventCallback<int> OnHeightMeasured { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
// We report 1100, but the CSS max-height: 80vh will cap it in the carousel
await OnHeightMeasured.InvokeAsync(1100);
}
}
}