PM-3349 Fix for HTML Label on Android. Color hex doesn't need to be cropped anymore.

This commit is contained in:
Dinis Vieira 2023-11-10 23:30:54 +00:00
parent 363da063fa
commit 0e75f3f5c8
No known key found for this signature in database
GPG Key ID: 9389160FF6C295F3
1 changed files with 3 additions and 5 deletions

View File

@ -27,11 +27,9 @@ namespace Bit.App.Utilities
return string.Empty;
}
// First two digits of returned hex code contains the alpha,
// which is not supported in HTML color, so we need to cut those out.
var normalColor = $"<span style=\"color:#{ThemeManager.GetResourceColor("TextColor").ToHex().Substring(3)}\">";
var numberColor = $"<span style=\"color:#{ThemeManager.GetResourceColor("PasswordNumberColor").ToHex().Substring(3)}\">";
var specialColor = $"<span style=\"color:#{ThemeManager.GetResourceColor("PasswordSpecialColor").ToHex().Substring(3)}\">";
var normalColor = $"<span style=\"color:{ThemeManager.GetResourceColor("TextColor").ToHex()}\">";
var numberColor = $"<span style=\"color:{ThemeManager.GetResourceColor("PasswordNumberColor").ToHex()}\">";
var specialColor = $"<span style=\"color:{ThemeManager.GetResourceColor("PasswordSpecialColor").ToHex()}\">";
var result = string.Empty;
// iOS won't hide the zero-width space char without these div attrs, but Android won't respect