Mail-logo als vooraf samengestelde witte badge (geen grijze plaat); succes-toast bij rolwijziging

- themes/asf/logo-mail.png (+ make-mail-logo.py), geleverd als /admin/brand-logo-mail.png; ASF Email:LogoUrl wijst ernaar
- Renderer: plaat weggehaald, licht logo 56px, dark-swap naar LogoDarkUrl blijft
- UsersPage: toast na geslaagde rolwijziging (nl+en, ook Owner-bevestiging)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 16:11:33 +01:00
co-authored by Claude Sonnet 5.5
parent 07bad14453
commit a9b9ad2931
13 changed files with 107 additions and 22 deletions
@@ -240,17 +240,19 @@ public class MailTemplateRendererTests
html.Should().MatchRegex("class=\"mail-logo-dark\"[^>]*display:none;[^>]*mso-hide:all");
// ... and the dark block swaps them and drops the plate
html.Should().Contain(".mail-logo-light{display:none !important").And.Contain(".mail-logo-dark{display:block !important")
.And.Contain(".mail-plate{background:transparent !important");
;
html.Should().NotContain("mail-plate"); // no grey plate any more
}
[Fact]
public void WithoutADarkLogo_ThereIsNoSwap_AndTheLightLogoKeepsItsLightPlate()
public void WithoutADarkLogo_ThereIsNoSwap_AndNoPlateEither()
{
var html = _renderer.Render(MailKind.Invitation, "nl", Model()).Html;
html.Should().NotContain("mail-logo-dark").And.NotContain(".mail-logo-light{").And.NotContain(".mail-plate{");
// the plate survives clients that invert backgrounds or ignore the media query
html.Should().Contain("class=\"mail-plate\" bgcolor=\"#f3f4f6\"").And.Contain("background-image:linear-gradient(#f3f4f6,#f3f4f6)");
html.Should().NotContain("mail-logo-dark").And.NotContain(".mail-logo-light{").And.NotContain("mail-plate")
.And.NotContain("#f3f4f6;background-image");
// the logo is shown as the image it is (a badge baked into the file), at its display height
html.Should().Contain("class=\"mail-logo-light\" src=\"https://t.nl/admin/brand-logo-on-light.png\" alt=\"Andrea Slop Fotografie\" height=\"56\"");
}
[Fact]