1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-24 10:14:55 +02:00
bitwarden-mobile/src/iOS.Autofill/SetupViewController.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
C#
Raw Normal View History

2019-06-28 14:21:44 +02:00
using System;
using UIKit;
using Bit.iOS.Core.Controllers;
using Bit.App.Resources;
using Bit.iOS.Core.Utilities;
namespace Bit.iOS.Autofill
{
public partial class SetupViewController : ExtendedUIViewController
{
2019-07-01 21:12:40 +02:00
public SetupViewController(IntPtr handle)
: base(handle)
{
DismissModalAction = Cancel;
}
2019-06-28 14:21:44 +02:00
public CredentialProviderViewController CPViewController { get; set; }
public override void ViewDidLoad()
{
var descriptor = UIFontDescriptor.PreferredBody;
DescriptionLabel.Text = $@"{AppResources.AutofillSetup}
{AppResources.AutofillSetup2}";
DescriptionLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize);
2019-07-01 21:12:40 +02:00
DescriptionLabel.TextColor = ThemeHelpers.MutedColor;
2019-06-28 14:21:44 +02:00
ActivatedLabel.Text = AppResources.AutofillActivated;
ActivatedLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize * 1.3f);
ActivatedLabel.TextColor = ThemeHelpers.SuccessColor;
2019-06-28 14:21:44 +02:00
BackButton.Title = AppResources.Back;
base.ViewDidLoad();
var task = ASHelpers.ReplaceAllIdentities();
}
partial void BackButton_Activated(UIBarButtonItem sender)
{
Cancel();
}
private void Cancel()
2019-06-28 14:21:44 +02:00
{
CPViewController.CompleteRequest();
}
}
}