From 73fd22479df41a678c13e495132b413142112700 Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Tue, 4 May 2021 10:14:19 +0200 Subject: [PATCH] Fix: Placeholder user avatar rendering (#9216) --- .../app/modules/principal/principal-renderer.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/modules/principal/principal-renderer.service.ts b/frontend/src/app/modules/principal/principal-renderer.service.ts index 41079dbc55..96abcb54e5 100644 --- a/frontend/src/app/modules/principal/principal-renderer.service.ts +++ b/frontend/src/app/modules/principal/principal-renderer.service.ts @@ -92,7 +92,13 @@ export class PrincipalRendererService { fallback.classList.add(`op-avatar_${type.replace('_', '-')}`); fallback.classList.add('op-avatar--fallback'); fallback.textContent = userInitials; - fallback.style.background = colorCode; + + if (type === "placeholder_user") { + fallback.style.color = colorCode; + fallback.style.borderColor = colorCode; + } else { + fallback.style.background = colorCode; + } // Image avatars are only supported for users if (type === 'user') {