2022-01-25 23:41:56 +03:00
|
|
|
using Bit.iOS.Core.Utilities;
|
|
|
|
using System;
|
|
|
|
using UIKit;
|
|
|
|
|
|
|
|
namespace Bit.iOS.ShareExtension
|
|
|
|
{
|
|
|
|
public partial class LockPasswordViewController : Core.Controllers.LockPasswordViewController
|
|
|
|
{
|
|
|
|
public LockPasswordViewController(IntPtr handle)
|
|
|
|
: base(handle)
|
|
|
|
{
|
2022-03-17 21:27:01 +03:00
|
|
|
BiometricIntegrityKey = Bit.Core.Constants.iOSShareExtensionBiometricIntegrityKey;
|
2022-01-25 23:41:56 +03:00
|
|
|
DismissModalAction = Cancel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public LoadingViewController LoadingController { get; set; }
|
|
|
|
public override UINavigationItem BaseNavItem => _navItem;
|
|
|
|
public override UIBarButtonItem BaseCancelButton => _cancelButton;
|
|
|
|
public override UIBarButtonItem BaseSubmitButton => _submitButton;
|
|
|
|
public override Action Success => () => LoadingController.DismissLockAndContinue();
|
|
|
|
public override Action Cancel => () => LoadingController.CompleteRequest();
|
|
|
|
|
|
|
|
public override void ViewDidLoad()
|
|
|
|
{
|
|
|
|
base.ViewDidLoad();
|
|
|
|
_cancelButton.TintColor = ThemeHelpers.NavBarTextColor;
|
|
|
|
_submitButton.TintColor = ThemeHelpers.NavBarTextColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
partial void SubmitButton_Activated(UIBarButtonItem sender)
|
|
|
|
{
|
|
|
|
var task = CheckPasswordAsync();
|
|
|
|
}
|
|
|
|
|
|
|
|
partial void CancelButton_Activated(UIBarButtonItem sender)
|
|
|
|
{
|
|
|
|
Cancel();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|