Compare commits
2 Commits
fc07fd78e1
...
ceab87833b
Author | SHA1 | Date |
---|---|---|
Mohammed Alhaddar | ceab87833b | |
Mohammed Alhaddar | a91399b3a8 |
|
@ -21,6 +21,19 @@ namespace Bit.Core.Models.View
|
|||
public string Code { get; set; }
|
||||
public string MaskedCode => Code != null ? new string('•', Code.Length) : null;
|
||||
public string MaskedNumber => Number != null ? new string('•', Number.Length) : null;
|
||||
public string SpacedNumber {
|
||||
get {
|
||||
if (Number == null) return null;
|
||||
var sb = new StringBuilder();
|
||||
for (int i = 0; i < Number.Length; i++) {
|
||||
sb.Append(Number[i]);
|
||||
if ((i + 1) % 4 == 0 && i + 1 < Number.Length) {
|
||||
sb.Append(" ");
|
||||
}
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public string Brand
|
||||
{
|
||||
|
|
|
@ -313,7 +313,7 @@
|
|||
IsVisible="{Binding ShowCardNumber, Converter={StaticResource inverseBool}}"
|
||||
AutomationId="ItemValue" />
|
||||
<controls:MonoLabel
|
||||
Text="{Binding Cipher.Card.Number, Mode=OneWay}"
|
||||
Text="{Binding Cipher.Card.SpacedNumber, Mode=OneWay}"
|
||||
StyleClass="box-value"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
|
|
Loading…
Reference in New Issue