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

51 lines
1.5 KiB
C#
Raw Normal View History

2019-06-28 14:57:08 +02:00
using System;
using Bit.iOS.Extension.Models;
using UIKit;
using Bit.iOS.Core.Controllers;
using Bit.App.Resources;
2019-07-01 21:12:40 +02:00
using Bit.iOS.Core.Utilities;
2019-06-28 14:57:08 +02:00
namespace Bit.iOS.Extension
{
public partial class SetupViewController : ExtendedUIViewController
{
public SetupViewController(IntPtr handle)
: base(handle)
2019-10-01 03:17:53 +02:00
{
ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
DismissModalAction = Cancel;
2019-10-01 03:17:53 +02:00
}
2019-06-28 14:57:08 +02:00
public Context Context { get; set; }
public LoadingViewController LoadingController { get; set; }
public override void ViewDidLoad()
{
2019-07-02 19:15:00 +02:00
base.ViewDidLoad();
2019-06-28 14:57:08 +02:00
var descriptor = UIFontDescriptor.PreferredBody;
DescriptionLabel.Text = $@"{AppResources.ExtensionSetup}
{AppResources.ExtensionSetup2}";
DescriptionLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize);
2019-07-01 21:12:40 +02:00
DescriptionLabel.TextColor = ThemeHelpers.MutedColor;
2019-06-28 14:57:08 +02:00
ActivatedLabel.Text = AppResources.ExtensionActivated;
ActivatedLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize * 1.3f);
2019-07-01 21:12:40 +02:00
ActivatedLabel.TextColor = ThemeHelpers.SuccessColor;
2019-06-28 14:57:08 +02:00
2019-07-01 21:12:40 +02:00
BackButton.TintColor = ThemeHelpers.NavBarTextColor;
2019-06-28 14:57:08 +02:00
BackButton.Title = AppResources.Back;
}
partial void BackButton_Activated(UIBarButtonItem sender)
{
Cancel();
}
private void Cancel()
2019-06-28 14:57:08 +02:00
{
2019-07-22 21:50:59 +02:00
LoadingController.CompleteRequest(null, null);
2019-06-28 14:57:08 +02:00
}
}
}