1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-28 12:35:40 +01:00

BEEEP: Colorize hidden custom field when value visible (#1813)

This commit is contained in:
Daniel James Smith 2022-02-25 21:47:21 +01:00 committed by GitHub
parent fac295c97b
commit 317e7dad9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -579,8 +579,8 @@
Grid.Row="1" Grid.Row="1"
Grid.Column="0"> Grid.Column="0">
<controls:MonoLabel <controls:MonoLabel
Text="{Binding ValueText, Mode=OneWay}" Text="{Binding ColoredHiddenValue, Mode=OneWay}"
StyleClass="box-value" StyleClass="box-value, text-html"
IsVisible="{Binding ShowHiddenValue}" /> IsVisible="{Binding ShowHiddenValue}" />
<controls:MonoLabel <controls:MonoLabel
Text="{Binding Field.MaskedValue, Mode=OneWay}" Text="{Binding Field.MaskedValue, Mode=OneWay}"

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -768,6 +768,8 @@ namespace Bit.App.Pages
} }
} }
public FormattedString ColoredHiddenValue => PasswordFormatter.FormatPassword(_field.Value);
public Command ToggleHiddenValueCommand { get; set; } public Command ToggleHiddenValueCommand { get; set; }
public string ShowHiddenValueIcon => _showHiddenValue ? BitwardenIcons.EyeSlash : BitwardenIcons.Eye; public string ShowHiddenValueIcon => _showHiddenValue ? BitwardenIcons.EyeSlash : BitwardenIcons.Eye;