mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
add/edit/delete custom fields. remove field page.
This commit is contained in:
@@ -323,6 +323,27 @@ namespace Bit.iOS.Services
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<string> DisplayPromptAync(string title = null, string description = null, string text = null)
|
||||
{
|
||||
var result = new TaskCompletionSource<string>();
|
||||
var alert = UIAlertController.Create(title ?? string.Empty, description, UIAlertControllerStyle.Alert);
|
||||
UITextField input = null;
|
||||
alert.AddAction(UIAlertAction.Create(AppResources.Cancel, UIAlertActionStyle.Cancel, x =>
|
||||
{
|
||||
result.TrySetResult(null);
|
||||
}));
|
||||
alert.AddAction(UIAlertAction.Create(AppResources.Ok, UIAlertActionStyle.Default, x =>
|
||||
{
|
||||
result.TrySetResult(input.Text ?? string.Empty);
|
||||
}));
|
||||
alert.AddTextField(x =>
|
||||
{
|
||||
input = x;
|
||||
input.Text = text ?? string.Empty;
|
||||
});
|
||||
return result.Task;
|
||||
}
|
||||
|
||||
private UIViewController GetPresentedViewController()
|
||||
{
|
||||
var window = UIApplication.SharedApplication.KeyWindow;
|
||||
|
||||
Reference in New Issue
Block a user