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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user