mirror of
https://github.com/bitwarden/mobile
synced 2025-12-30 15:13:24 +00:00
add other cipher type support to vault listings
This commit is contained in:
@@ -7,15 +7,15 @@ namespace Bit.App.Controls
|
||||
public class VaultListViewCell : LabeledDetailCell
|
||||
{
|
||||
public static readonly BindableProperty LoginParameterProperty = BindableProperty.Create(nameof(LoginParameter),
|
||||
typeof(VaultListPageModel.Login), typeof(VaultListViewCell), null);
|
||||
typeof(VaultListPageModel.Cipher), typeof(VaultListViewCell), null);
|
||||
|
||||
public VaultListViewCell(Action<VaultListPageModel.Login> moreClickedAction)
|
||||
public VaultListViewCell(Action<VaultListPageModel.Cipher> moreClickedAction)
|
||||
{
|
||||
SetBinding(LoginParameterProperty, new Binding("."));
|
||||
Label.SetBinding(Label.TextProperty, nameof(VaultListPageModel.Login.Name));
|
||||
Detail.SetBinding(Label.TextProperty, nameof(VaultListPageModel.Login.Username));
|
||||
LabelIcon.SetBinding(VisualElement.IsVisibleProperty, nameof(VaultListPageModel.Login.Shared));
|
||||
LabelIcon2.SetBinding(VisualElement.IsVisibleProperty, nameof(VaultListPageModel.Login.HasAttachments));
|
||||
Label.SetBinding(Label.TextProperty, nameof(VaultListPageModel.Cipher.Name));
|
||||
Detail.SetBinding(Label.TextProperty, nameof(VaultListPageModel.Cipher.Subtitle));
|
||||
LabelIcon.SetBinding(VisualElement.IsVisibleProperty, nameof(VaultListPageModel.Cipher.Shared));
|
||||
LabelIcon2.SetBinding(VisualElement.IsVisibleProperty, nameof(VaultListPageModel.Cipher.HasAttachments));
|
||||
|
||||
Button.Image = "more";
|
||||
Button.Command = new Command(() => moreClickedAction?.Invoke(LoginParameter));
|
||||
@@ -27,9 +27,9 @@ namespace Bit.App.Controls
|
||||
BackgroundColor = Color.White;
|
||||
}
|
||||
|
||||
public VaultListPageModel.Login LoginParameter
|
||||
public VaultListPageModel.Cipher LoginParameter
|
||||
{
|
||||
get { return GetValue(LoginParameterProperty) as VaultListPageModel.Login; }
|
||||
get { return GetValue(LoginParameterProperty) as VaultListPageModel.Cipher; }
|
||||
set { SetValue(LoginParameterProperty, value); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user