Hero-admin: schakelaar Actief, destructieve knoppen rood, slide-kopjes, juiste voorvertoning in het focusvenster, status per foto
- Schakelaar (role=switch) Actief / Niet actief bij de knoppen, gedimde rij; 'Verberg voor schermlezers'; veld 'Beschrijving' binnen een groep 'Slide N'
- Alle foto's zonder complete set tonen 'Wordt verwerkt' (voortgang bij de foto die bezig is, 'in de wachtrij' bij de rest); totaal bovenaan telt ook nog niet opgeslagen foto's
- Per foto 'Verwerking afgerond' (zelfde weergave voor een hergebruikte foto), foto direct bruikbaar; niet-opgeslagen foto's worden zelf ververst (GET /hero/images/{id}), ook in een achtergrondtab
- Focusvenster toont de hele foto (full-preview in elke set, achtergrond-aanvulling voor oude sets) in plaats van de uitgesneden wide-variant (vervorming)
- Prullenbak en 'Wijzigingen weggooien' in de destructieve stijl
- upload-respons: reused (intern)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,9 +115,23 @@ public class HeroAsfSiteE2ETests : IClassFixture<AsfSiteFactory>
|
||||
await InScope(async sp =>
|
||||
{
|
||||
// The variants are cut by the background renderer in production; here it is run to the end at once.
|
||||
while (await sp.GetRequiredService<IHeroImageService>().RenderNextPendingAsync(new HashSet<Guid>(), default) is not null)
|
||||
// The shared test database may hold rows of earlier runs whose files are gone: those fail and are skipped,
|
||||
// the way the background renderer gives up on them.
|
||||
var skip = new HashSet<Guid>();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (await sp.GetRequiredService<IHeroImageService>().RenderNextPendingAsync(skip, default) is null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (HeroImageRenderException failure)
|
||||
{
|
||||
skip.Add(failure.ImageId);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -136,8 +136,22 @@ public class HeroInjectionPipelineTests : IClassFixture<HeroInjectionFactory>
|
||||
await InScope(async sp =>
|
||||
{
|
||||
// The variants are cut by the background renderer in production; here it is run to the end at once.
|
||||
while (await sp.GetRequiredService<IHeroImageService>().RenderNextPendingAsync(new HashSet<Guid>(), default) is not null)
|
||||
// The shared test database may hold rows of earlier runs whose files are gone: those fail and are skipped,
|
||||
// the way the background renderer gives up on them.
|
||||
var skip = new HashSet<Guid>();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (await sp.GetRequiredService<IHeroImageService>().RenderNextPendingAsync(skip, default) is null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (HeroImageRenderException failure)
|
||||
{
|
||||
skip.Add(failure.ImageId);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -21,6 +21,24 @@ public static class VariantPlanner
|
||||
/// planned in WebP, and in AVIF when <paramref name="outputs"/> contains it. WebP is required: without WebP the
|
||||
/// plan falls back to JPEG so a platform without a WebP encoder still publishes something.
|
||||
/// </summary>
|
||||
/// <summary>The ratio name of the full-frame preview (the whole picture, not cut around a point).</summary>
|
||||
public const string PreviewRatioName = "full";
|
||||
|
||||
/// <summary>The widest full-frame preview.</summary>
|
||||
public const int PreviewMaxWidth = 1280;
|
||||
|
||||
/// <summary>
|
||||
/// The full-frame preview an administrator needs to choose the focus point: the WHOLE oriented picture at its own
|
||||
/// shape, scaled down to at most <see cref="PreviewMaxWidth"/> (never up). Not published to websites.
|
||||
/// </summary>
|
||||
public static VariantSpec Preview(int sourceWidth, int sourceHeight, IReadOnlySet<ImageFormat> outputs)
|
||||
{
|
||||
var width = Math.Min(PreviewMaxWidth, sourceWidth);
|
||||
var height = Math.Max(1, (int)Math.Round(width * (double)sourceHeight / sourceWidth));
|
||||
var (format, quality) = outputs.Contains(ImageFormat.WebP) ? (ImageFormat.WebP, WebPQuality) : (ImageFormat.Jpeg, JpegQuality);
|
||||
return new VariantSpec(new Ratio(PreviewRatioName, sourceWidth, sourceHeight), width, height, format, quality, new CropRect(0, 0, sourceWidth, sourceHeight));
|
||||
}
|
||||
|
||||
public static IReadOnlyList<VariantSpec> Plan(
|
||||
int sourceWidth,
|
||||
int sourceHeight,
|
||||
|
||||
@@ -264,4 +264,112 @@ public class HeroFocusSaveTests
|
||||
await act.Should().ThrowAsync<OperationCanceledException>();
|
||||
done.Should().BeLessThan(specs.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task EveryImageWithoutACompleteSet_IsProcessing_InTheAdminApi_AndTwoNewPhotosAreBothCut()
|
||||
{
|
||||
using var rig = new HeroTestRig();
|
||||
// The helper Upload cuts everything that is pending, so the finished photo is made first.
|
||||
var ready = await rig.Upload(HeroTestRig.Photo(seed: 3));
|
||||
var first = await rig.UploadWithoutRendering(HeroTestRig.Photo(seed: 1));
|
||||
var second = await rig.UploadWithoutRendering(HeroTestRig.Photo(seed: 2));
|
||||
var request = new HeroSaveRequest("Titel", null, null, "slideshow", [], true, null, null,
|
||||
[new HeroSlideRequest(null, Guid.Parse(first.Id), "een"), new HeroSlideRequest(null, Guid.Parse(second.Id), "twee"), new HeroSlideRequest(null, Guid.Parse(ready.Id), "drie")]);
|
||||
|
||||
var saved = await rig.Service.SaveAsync(request, HeroTestRig.Admin, default);
|
||||
|
||||
saved.Slides.Select(s => s.Image.Processing).Should().Equal(true, true, false);
|
||||
(await rig.Service.GetAsync(default)).Slides.Select(s => s.Image.Processing).Should().Equal(true, true, false);
|
||||
|
||||
(await rig.RenderPending()).Should().Be(2, "both new photos are cut, one after the other");
|
||||
|
||||
(await rig.Service.GetAsync(default)).Slides.Should().OnlyContain(s => !s.Image.Processing && s.Image.Variants.Count > 0);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(3000, 2000)]
|
||||
[InlineData(2000, 3000)]
|
||||
[InlineData(1600, 1600)]
|
||||
[InlineData(3000, 1000)]
|
||||
public async Task EverySet_HasAFullFramePreviewAtTheShapeOfThePicture_ThatIsNotPublishedToWebsites(int width, int height)
|
||||
{
|
||||
using var rig = new HeroTestRig();
|
||||
var image = await rig.Upload(HeroTestRig.Photo(width, height));
|
||||
var id = Guid.Parse(image.Id);
|
||||
await rig.Service.SaveAsync(Save(id, null), HeroTestRig.Admin, default);
|
||||
|
||||
var admin = (await rig.Service.GetAsync(default)).Slides[0].Image;
|
||||
var stored = rig.Db.HeroImages.Single();
|
||||
|
||||
admin.PreviewSrc.Should().NotBeNull();
|
||||
var preview = stored.Variants.Single(v => v.Ratio == "full");
|
||||
(preview.Width / (double)preview.Height).Should().BeApproximately(width / (double)height, 0.01, "the preview is the whole picture, not a crop");
|
||||
preview.Width.Should().Be(Math.Min(1280, width));
|
||||
admin.Variants.Should().NotContain(v => v.Ratio == "full", "the admin lists only the variants of the website");
|
||||
(await rig.Public.GetActiveAsync(default))!.Slides[0].Image.Variants.Should().NotContain(v => v.Ratio == "full");
|
||||
(await rig.Store.ExistsAsync($"hero/{stored.SetHash}/{preview.FileName}", default)).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ASetMadeBeforeThePreviewExisted_GetsOnlyThePreviewAdded_WithoutBeingProcessingOrChangingItsAddresses()
|
||||
{
|
||||
using var rig = new HeroTestRig();
|
||||
var image = await rig.Upload(HeroTestRig.Photo(2000, 3000));
|
||||
var id = Guid.Parse(image.Id);
|
||||
await rig.Service.SaveAsync(Save(id, null), HeroTestRig.Admin, default);
|
||||
var stored = rig.Db.HeroImages.Single();
|
||||
var setBefore = stored.SetHash;
|
||||
var preview = stored.Variants.Single(v => v.Ratio == "full");
|
||||
stored.Variants = stored.Variants.Where(v => v.Ratio != "full").ToList(); // as an older set looked
|
||||
await rig.Db.SaveChangesAsync();
|
||||
await rig.Store.DeleteAsync($"hero/{setBefore}/{preview.FileName}", default);
|
||||
|
||||
var oldLook = (await rig.Service.GetAsync(default)).Slides[0].Image;
|
||||
oldLook.Processing.Should().BeFalse("adding the preview is not work the administrator waits for");
|
||||
oldLook.PreviewSrc.Should().BeNull();
|
||||
|
||||
(await rig.RenderPending()).Should().Be(1);
|
||||
|
||||
var after = rig.Db.HeroImages.Single();
|
||||
after.SetHash.Should().Be(setBefore, "nothing live changes");
|
||||
(await rig.Service.GetAsync(default)).Slides[0].Image.PreviewSrc.Should().NotBeNull();
|
||||
(await rig.Store.ExistsAsync($"hero/{setBefore}/{preview.FileName}", default)).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task APhotoThatIsAlreadyThere_ComesBackAsReused_WithItsVariants_AndNothingToWaitFor()
|
||||
{
|
||||
using var rig = new HeroTestRig();
|
||||
var photo = HeroTestRig.Photo(seed: 5);
|
||||
var first = await rig.Upload(photo);
|
||||
|
||||
var again = await rig.UploadWithoutRendering(photo);
|
||||
|
||||
again.Id.Should().Be(first.Id);
|
||||
again.Reused.Should().BeTrue();
|
||||
again.Processing.Should().BeFalse();
|
||||
again.Variants.Should().NotBeEmpty();
|
||||
first.Reused.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task TheStateOfOneImage_IsAskedForByItsId_WithTheRunningRenderersFlags()
|
||||
{
|
||||
using var rig = new HeroTestRig();
|
||||
var dto = await rig.UploadWithoutRendering(HeroTestRig.Photo(seed: 6));
|
||||
var id = Guid.Parse(dto.Id);
|
||||
|
||||
(await rig.Images.GetImageAsync(id, default))!.Processing.Should().BeTrue();
|
||||
rig.Signal.SetProgress(id, 4, 19);
|
||||
var busy = (await rig.Images.GetImageAsync(id, default))!;
|
||||
(busy.RenderDone, busy.RenderTotal).Should().Be((4, 19));
|
||||
rig.Signal.ClearProgress(id);
|
||||
|
||||
await rig.RenderPending();
|
||||
|
||||
var done = (await rig.Images.GetImageAsync(id, default))!;
|
||||
done.Processing.Should().BeFalse();
|
||||
done.Variants.Should().NotBeEmpty();
|
||||
(await rig.Images.GetImageAsync(Guid.NewGuid(), default)).Should().BeNull();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,16 @@ public class HeroImagesController(IHeroImageService service, IOptions<MediaOptio
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>One image as the admin sees it now; the page asks for the images it uploaded but has not saved yet.</summary>
|
||||
[HttpGet("{id:guid}")]
|
||||
[ProducesResponseType<HeroImageDto>(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> Get(Guid id, CancellationToken cancellationToken)
|
||||
{
|
||||
var image = await service.GetImageAsync(id, cancellationToken);
|
||||
return image is null ? NotFound(new { error = "not_found", message = Texts().Get(HeroTexts.Image.NotFound) }) : Ok(image);
|
||||
}
|
||||
|
||||
/// <summary>The formats and limits an upload has to meet on this host (what the validation uses).</summary>
|
||||
[HttpGet("limits")]
|
||||
[ProducesResponseType<HeroUploadLimitsDto>(StatusCodes.Status200OK)]
|
||||
|
||||
@@ -27,7 +27,9 @@ public record HeroImageDto(
|
||||
bool Processing = false,
|
||||
bool Failed = false,
|
||||
int? RenderDone = null,
|
||||
int? RenderTotal = null);
|
||||
int? RenderTotal = null,
|
||||
string? PreviewSrc = null,
|
||||
bool Reused = false);
|
||||
|
||||
public record HeroButtonDto(string Label, string Target);
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ public interface IHeroRepository
|
||||
/// <summary>Images whose set is missing or does not match their focus, oldest first (tracked).</summary>
|
||||
Task<IReadOnlyList<HeroImage>> GetImagesNeedingRenderAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>Images with a complete set made before the full-frame preview existed (tracked).</summary>
|
||||
Task<IReadOnlyList<HeroImage>> GetImagesNeedingPreviewAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>The image as stored right now, not tracked.</summary>
|
||||
Task<HeroImage?> GetImageFreshAsync(Guid id, CancellationToken cancellationToken);
|
||||
|
||||
@@ -72,6 +75,9 @@ public class HeroRepository(HeroDbContext context) : IHeroRepository
|
||||
public async Task<IReadOnlyList<HeroImage>> GetImagesNeedingRenderAsync(CancellationToken cancellationToken)
|
||||
=> (await context.HeroImages.ToListAsync(cancellationToken)).Where(HeroMapping.NeedsRender).OrderBy(i => i.CreatedAt).ToList();
|
||||
|
||||
public async Task<IReadOnlyList<HeroImage>> GetImagesNeedingPreviewAsync(CancellationToken cancellationToken)
|
||||
=> (await context.HeroImages.ToListAsync(cancellationToken)).Where(HeroMapping.NeedsPreview).OrderBy(i => i.CreatedAt).ToList();
|
||||
|
||||
public Task<HeroImage?> GetImageFreshAsync(Guid id, CancellationToken cancellationToken)
|
||||
=> context.HeroImages.AsNoTracking().FirstOrDefaultAsync(i => i.Id == id, cancellationToken);
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ public interface IHeroImageService
|
||||
/// <summary>The variant the renderer is busy with: (done, total), or null when the image is not being cut right now.</summary>
|
||||
(int Done, int Total)? RenderProgress(Guid imageId);
|
||||
|
||||
/// <summary>One image as the admin sees it now (including whether it is still being prepared). Null when there is no such image.</summary>
|
||||
Task<HeroImageDto?> GetImageAsync(Guid imageId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>True when the background renderer gave up on the image after a few failed tries (until a retry or a restart).</summary>
|
||||
bool IsRenderFailed(Guid imageId);
|
||||
|
||||
@@ -90,7 +93,7 @@ public class HeroImageService(
|
||||
// The same photo again also gives up the failed state: the renderer tries it again when it is still pending.
|
||||
signal?.Reset(existing.Id);
|
||||
signal?.Notify();
|
||||
return HeroMapping.ToImageDto(existing);
|
||||
return HeroMapping.ToImageDto(existing) with { Reused = true };
|
||||
}
|
||||
|
||||
await EnsureRoomAsync(admitted.Bytes.Length, cancellationToken);
|
||||
@@ -161,6 +164,19 @@ public class HeroImageService(
|
||||
|
||||
public void NotifyPending() => signal?.Notify();
|
||||
|
||||
public async Task<HeroImageDto?> GetImageAsync(Guid imageId, CancellationToken cancellationToken)
|
||||
{
|
||||
var image = await repository.GetImageFreshAsync(imageId, cancellationToken);
|
||||
if (image is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var failed = IsRenderFailed(imageId);
|
||||
var progress = RenderProgress(imageId);
|
||||
return HeroMapping.ToImageDto(image) with { Failed = failed, RenderDone = progress?.Done, RenderTotal = progress?.Total };
|
||||
}
|
||||
|
||||
public bool IsRenderFailed(Guid imageId) => signal?.IsGivenUp(imageId) ?? false;
|
||||
|
||||
public (int Done, int Total)? RenderProgress(Guid imageId) => signal?.GetProgress(imageId);
|
||||
@@ -177,7 +193,9 @@ public class HeroImageService(
|
||||
var image = (await repository.GetImagesNeedingRenderAsync(cancellationToken)).FirstOrDefault(i => !skip.Contains(i.Id));
|
||||
if (image is null)
|
||||
{
|
||||
return null;
|
||||
// Nothing to cut: add the full-frame preview to complete sets that were made before it existed.
|
||||
var old = (await repository.GetImagesNeedingPreviewAsync(cancellationToken)).FirstOrDefault(i => !skip.Contains(i.Id));
|
||||
return old is null ? null : await AddPreviewAsync(old, cancellationToken);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -195,6 +213,40 @@ public class HeroImageService(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Makes only the preview file of a complete set (one decode, one resize) and adds it to the set where it already is.</summary>
|
||||
private async Task<Guid?> AddPreviewAsync(HeroImage image, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (await gate.EnterAsync(cancellationToken))
|
||||
{
|
||||
var file = await store.OpenReadAsync(image.OriginalKey, cancellationToken)
|
||||
?? throw new ImageRejectedException(ImageRejection.Unavailable, "The stored original is missing.");
|
||||
using var memory = new MemoryStream();
|
||||
await using (file.Content)
|
||||
{
|
||||
await file.Content.CopyToAsync(memory, cancellationToken);
|
||||
}
|
||||
|
||||
var storedFormat = ImageFormatExtensions.FromExtension(Path.GetExtension(image.OriginalKey).TrimStart('.'));
|
||||
var spec = VariantPlanner.Preview(image.Width, image.Height, processor.SupportedOutput);
|
||||
var rendered = (await processor.RenderSetAsync(memory.ToArray(), storedFormat, [spec], null, cancellationToken))[0];
|
||||
var name = MediaPaths.FileName(spec.Ratio.Name, spec.Width, spec.Format);
|
||||
await store.PutAsync($"{HeroMapping.Area}/{image.SetHash}/{name}", rendered.Bytes, cancellationToken);
|
||||
image.Variants = [.. image.Variants, new HeroVariant(spec.Ratio.Name, rendered.Width, rendered.Height, spec.Format.MimeType(), name, rendered.Bytes.LongLength)];
|
||||
}
|
||||
|
||||
await repository.SaveChangesAsync(cancellationToken);
|
||||
logger.LogInformation("Hero image {ImageId}: the full-frame preview was added to its set.", image.Id);
|
||||
return image.Id;
|
||||
}
|
||||
catch (Exception exception) when (exception is not OperationCanceledException)
|
||||
{
|
||||
logger.LogError(exception, "Hero image {ImageId}: adding the preview failed.", image.Id);
|
||||
throw new HeroImageRenderException(image.Id, exception);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<Guid?> RenderAsync(HeroImage image, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
@@ -283,7 +335,9 @@ public class HeroImageService(
|
||||
var ratios = new[] { Ratio.Wide, Ratio.Tall }
|
||||
.Select(r => new RatioPlan(r, image.FocusFor(r.Name), VariantPlanner.DefaultWidths(r)))
|
||||
.ToList();
|
||||
var specs = VariantPlanner.Plan(image.Width, image.Height, ratios, processor.SupportedOutput);
|
||||
var specs = VariantPlanner.Plan(image.Width, image.Height, ratios, processor.SupportedOutput).ToList();
|
||||
// The whole picture, for the focus dialog of the admin (never published to a website).
|
||||
specs.Add(VariantPlanner.Preview(image.Width, image.Height, processor.SupportedOutput));
|
||||
progress?.Invoke(0, specs.Count);
|
||||
|
||||
var rendered = await processor.RenderSetAsync(original, storedFormat, specs, progress, cancellationToken);
|
||||
|
||||
@@ -47,6 +47,19 @@ public static class HeroMapping
|
||||
_ => format.ToString().ToUpperInvariant(),
|
||||
};
|
||||
|
||||
/// <summary>The variants websites and the admin lists use: everything except the full-frame preview.</summary>
|
||||
public static IEnumerable<HeroVariant> Published(HeroImage image) => image.Variants.Where(v => v.Ratio != VariantPlanner.PreviewRatioName);
|
||||
|
||||
/// <summary>The address of the full-frame preview for the focus dialog, or null while the set has none yet.</summary>
|
||||
public static string? PreviewSrc(HeroImage image)
|
||||
=> image.Variants.FirstOrDefault(v => v.Ratio == VariantPlanner.PreviewRatioName) is { } preview
|
||||
? MediaPaths.Url(Area, image.SetHash, preview.FileName)
|
||||
: null;
|
||||
|
||||
/// <summary>A complete, current set that lacks the preview (made before it existed): only that file is added, quietly.</summary>
|
||||
public static bool NeedsPreview(HeroImage image)
|
||||
=> !NeedsRender(image) && image.Variants.All(v => v.Ratio != VariantPlanner.PreviewRatioName);
|
||||
|
||||
/// <summary>The set hash the image should have at its current focus.</summary>
|
||||
public static string TargetSetHash(HeroImage image)
|
||||
=> MediaPaths.SetHash(image.OriginalSha256, [("wide", image.FocusFor("wide")), ("tall", image.FocusFor("tall"))]);
|
||||
@@ -60,10 +73,10 @@ public static class HeroMapping
|
||||
/// <summary>The address the plain <c>img</c> uses: the largest WebP of the wide ratio, else the largest WebP, else the first variant.</summary>
|
||||
public static string SrcFor(HeroImage image)
|
||||
{
|
||||
var webp = image.Variants.Where(v => v.Type == ImageFormat.WebP.MimeType()).ToList();
|
||||
var webp = Published(image).Where(v => v.Type == ImageFormat.WebP.MimeType()).ToList();
|
||||
var pick = webp.Where(v => v.Ratio == "wide").OrderByDescending(v => v.Width).FirstOrDefault()
|
||||
?? webp.OrderByDescending(v => v.Width).FirstOrDefault()
|
||||
?? image.Variants.FirstOrDefault();
|
||||
?? Published(image).FirstOrDefault();
|
||||
return pick is null ? string.Empty : MediaPaths.Url(Area, image.SetHash, pick.FileName);
|
||||
}
|
||||
|
||||
@@ -76,8 +89,9 @@ public static class HeroMapping
|
||||
image.WideFocusX is null ? null : FocusDto.From(image.FocusFor("wide")),
|
||||
image.TallFocusX is null ? null : FocusDto.From(image.FocusFor("tall")),
|
||||
SrcFor(image),
|
||||
image.Variants.Select(v => ToDto(image, v)).ToList(),
|
||||
NeedsRender(image));
|
||||
Published(image).Select(v => ToDto(image, v)).ToList(),
|
||||
NeedsRender(image),
|
||||
PreviewSrc: PreviewSrc(image));
|
||||
|
||||
public static bool IsLive(HeroContent hero, DateTimeOffset now)
|
||||
=> hero.IsActive
|
||||
@@ -137,7 +151,7 @@ public static class HeroMapping
|
||||
image.Height,
|
||||
FocusDto.From(image.General),
|
||||
SrcFor(image),
|
||||
image.Variants.Select(v => ToDto(image, v)).ToList(),
|
||||
Published(image).Select(v => ToDto(image, v)).ToList(),
|
||||
byRatio);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user