mirror of
https://github.com/bitwarden/mobile
synced 2026-01-09 12:03:16 +00:00
PM-4404 Added CreationDate to Fido2Credential objects and updated the UI bindings accordingly (#2832)
This commit is contained in:
committed by
GitHub
parent
72de17bd1d
commit
142c3145f0
@@ -12,6 +12,7 @@
|
||||
xmlns:dts="clr-namespace:Bit.App.Lists.DataTemplateSelectors"
|
||||
xmlns:il="clr-namespace:Bit.App.Lists.ItemLayouts.CustomFields"
|
||||
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
|
||||
xmlns:appResources="clr-namespace:Bit.App.Resources"
|
||||
x:DataType="pages:CipherAddEditPageViewModel"
|
||||
x:Name="_page"
|
||||
Title="{Binding PageTitle}">
|
||||
@@ -28,6 +29,8 @@
|
||||
<u:InverseBoolConverter x:Key="inverseBool" />
|
||||
<u:StringHasValueConverter x:Key="stringHasValue" />
|
||||
<u:IsNotNullConverter x:Key="notNull" />
|
||||
<u:DateTimeConverter x:Key="dateTime" Format="{x:Static appResources:AppResources.CreatedXY}" />
|
||||
|
||||
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" Order="Primary" Priority="-1"
|
||||
x:Key="closeItem" x:Name="_closeItem" />
|
||||
<ToolbarItem Text="{u:I18n Collections}"
|
||||
@@ -229,7 +232,7 @@
|
||||
Margin="0,10,0,0"
|
||||
IsVisible="{Binding ShowPasskeyInfo}"/>
|
||||
<Entry
|
||||
Text="{Binding CreationDate}"
|
||||
Text="{Binding Cipher.Login.MainFido2Credential.CreationDate, Mode=OneWay, Converter={StaticResource dateTime}, FallbackValue=''}"
|
||||
IsEnabled="False"
|
||||
StyleClass="box-value,text-muted"
|
||||
IsVisible="{Binding ShowPasskeyInfo}" />
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
xmlns:dts="clr-namespace:Bit.App.Lists.DataTemplateSelectors"
|
||||
xmlns:il="clr-namespace:Bit.App.Lists.ItemLayouts.CustomFields"
|
||||
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
|
||||
xmlns:appResources="clr-namespace:Bit.App.Resources"
|
||||
x:DataType="pages:CipherDetailsPageViewModel"
|
||||
x:Name="_page"
|
||||
Title="{Binding PageTitle}">
|
||||
@@ -23,6 +24,7 @@
|
||||
<u:InverseBoolConverter x:Key="inverseBool" />
|
||||
<u:StringHasValueConverter x:Key="stringHasValue" />
|
||||
<u:IsNotNullConverter x:Key="notNull" />
|
||||
<u:DateTimeConverter x:Key="dateTime" Format="{x:Static appResources:AppResources.CreatedXY}" />
|
||||
<ToolbarItem Text="{u:I18n Collections}"
|
||||
x:Key="collectionsItem"
|
||||
x:Name="_collectionsItem"
|
||||
@@ -201,10 +203,10 @@
|
||||
Margin="0,10,0,0"
|
||||
IsVisible="{Binding Cipher.Login.MainFido2Credential, Converter={StaticResource notNull}}"/>
|
||||
<Entry
|
||||
Text="{Binding CreationDate}"
|
||||
Text="{Binding Cipher.Login.MainFido2Credential.CreationDate, Mode=OneWay, Converter={StaticResource dateTime}, FallbackValue=''}"
|
||||
IsEnabled="False"
|
||||
StyleClass="box-value,text-muted"
|
||||
IsVisible="{Binding Cipher.Login.MainFido2Credential, Converter={StaticResource notNull}}" />
|
||||
IsVisible="{Binding Cipher.Login.MainFido2Credential, Converter={StaticResource notNull}, FallbackValue=False}" />
|
||||
<Grid StyleClass="box-row"
|
||||
IsVisible="{Binding ShowTotp}"
|
||||
AutomationId="ItemRow">
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace Bit.App.Utilities
|
||||
{
|
||||
public class DateTimeConverter : IValueConverter
|
||||
{
|
||||
public string Format { get; set; } = "{0} {1}";
|
||||
|
||||
private readonly ILocalizeService _localizeService;
|
||||
|
||||
public DateTimeConverter()
|
||||
@@ -26,7 +28,7 @@ namespace Bit.App.Utilities
|
||||
return string.Empty;
|
||||
}
|
||||
var d = ((DateTime)value).ToLocalTime();
|
||||
return string.Format("{0} {1}",
|
||||
return string.Format(Format,
|
||||
_localizeService.GetLocaleShortDate(d),
|
||||
_localizeService.GetLocaleShortTime(d));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user