mirror of
https://github.com/bitwarden/mobile
synced 2026-01-04 17:43:17 +00:00
more button on cipher listing
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
xmlns:u="clr-namespace:Bit.App.Utilities"
|
||||
xmlns:controls="clr-namespace:Bit.App.Controls"
|
||||
x:DataType="pages:GroupingsPageViewModel"
|
||||
Title="{Binding PageTitle}">
|
||||
Title="{Binding PageTitle}"
|
||||
x:Name="_page">
|
||||
|
||||
<ContentPage.BindingContext>
|
||||
<pages:GroupingsPageViewModel />
|
||||
@@ -16,7 +17,9 @@
|
||||
<ResourceDictionary>
|
||||
<DataTemplate x:Key="cipherTemplate"
|
||||
x:DataType="pages:GroupingsPageListItem">
|
||||
<controls:CipherViewCell Cipher="{Binding Cipher}" />
|
||||
<controls:CipherViewCell
|
||||
Cipher="{Binding Cipher}"
|
||||
ButtonCommand="{Binding BindingContext.CipherOptionsCommand, Source={x:Reference _page}}" />
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="folderTemplate"
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace Bit.App.Pages
|
||||
await LoadAsync();
|
||||
});
|
||||
AddCipherCommand = new Command(() => { /* TODO */ });
|
||||
CipherOptionsCommand = new Command<CipherView>(CipherOptionsAsync);
|
||||
}
|
||||
|
||||
public bool ShowFavorites { get; set; } = true;
|
||||
@@ -99,6 +100,7 @@ namespace Bit.App.Pages
|
||||
public ExtendedObservableCollection<GroupingsPageListGroup> GroupedItems { get; set; }
|
||||
public Command RefreshCommand { get; set; }
|
||||
public Command AddCipherCommand { get; set; }
|
||||
public Command<CipherView> CipherOptionsCommand { get; set; }
|
||||
|
||||
public async Task LoadAsync()
|
||||
{
|
||||
@@ -273,5 +275,15 @@ namespace Bit.App.Pages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void CipherOptionsAsync(CipherView cipher)
|
||||
{
|
||||
var option = await Page.DisplayActionSheet(cipher.Name, AppResources.Cancel, null, "1", "2");
|
||||
if(option == AppResources.Cancel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// TODO: process options
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user