mirror of
https://github.com/bitwarden/mobile
synced 2025-12-26 13:13:28 +00:00
more button on cipher listing
This commit is contained in:
@@ -74,13 +74,14 @@
|
||||
Margin="5, 0, 0, 0"
|
||||
Text=""
|
||||
IsVisible="{Binding Cipher.HasAttachments, Mode=OneWay}" />
|
||||
|
||||
<Button WidthRequest="60"
|
||||
Grid.Column="4"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="Transparent" />
|
||||
|
||||
<ImageButton
|
||||
Source="more.png"
|
||||
StyleClass="list-button, list-button-platform"
|
||||
Clicked="ImageButton_Clicked"
|
||||
Grid.Column="4"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2" />
|
||||
</Grid>
|
||||
|
||||
</ViewCell.View>
|
||||
</ViewCell>
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace Bit.App.Controls
|
||||
public static readonly BindableProperty CipherProperty = BindableProperty.Create(
|
||||
nameof(Cipher), typeof(CipherView), typeof(CipherViewCell), default(CipherView), BindingMode.OneWay);
|
||||
|
||||
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(
|
||||
nameof(ButtonCommand), typeof(Command<CipherView>), typeof(CipherViewCell));
|
||||
|
||||
private CipherViewCellViewModel _viewModel;
|
||||
|
||||
public CipherViewCell()
|
||||
@@ -27,6 +30,12 @@ namespace Bit.App.Controls
|
||||
set => SetValue(CipherProperty, value);
|
||||
}
|
||||
|
||||
public Command<CipherView> ButtonCommand
|
||||
{
|
||||
get => GetValue(ButtonCommandProperty) as Command<CipherView>;
|
||||
set => SetValue(ButtonCommandProperty, value);
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged(string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanged(propertyName);
|
||||
@@ -118,5 +127,10 @@ namespace Bit.App.Controls
|
||||
}
|
||||
return new Tuple<string, string>(icon, image);
|
||||
}
|
||||
|
||||
private void ImageButton_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
ButtonCommand?.Execute(Cipher);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user