1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-04 01:23:15 +00:00

ios app extension theming

This commit is contained in:
Kyle Spearrin
2019-07-01 15:12:40 -04:00
parent 73b5d1b3f1
commit 225db6397d
26 changed files with 284 additions and 155 deletions

View File

@@ -243,6 +243,7 @@ namespace Bit.iOS.Autofill
private void InitApp()
{
iOSCoreHelpers.AppearanceAdjustments();
if(ServiceContainer.RegisteredServices.Count > 0)
{
return;
@@ -251,7 +252,6 @@ namespace Bit.iOS.Autofill
ServiceContainer.Init();
iOSCoreHelpers.RegisterHockeyApp();
iOSCoreHelpers.Bootstrap();
iOSCoreHelpers.AppearanceAdjustments();
}
}
}

View File

@@ -18,13 +18,6 @@ namespace Bit.iOS.Autofill
public Context Context { get; set; }
public CredentialProviderViewController CPViewController { get; set; }
public override void ViewWillAppear(bool animated)
{
UINavigationBar.Appearance.ShadowImage = new UIImage();
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
base.ViewWillAppear(animated);
}
public async override void ViewDidLoad()
{
base.ViewDidLoad();

View File

@@ -6,6 +6,7 @@ using Bit.iOS.Core.Controllers;
using Bit.App.Resources;
using Bit.iOS.Core.Views;
using Bit.iOS.Autofill.Utilities;
using Bit.iOS.Core.Utilities;
namespace Bit.iOS.Autofill
{
@@ -18,19 +19,16 @@ namespace Bit.iOS.Autofill
public Context Context { get; set; }
public CredentialProviderViewController CPViewController { get; set; }
public override void ViewWillAppear(bool animated)
{
UINavigationBar.Appearance.ShadowImage = new UIImage();
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
base.ViewWillAppear(animated);
}
public async override void ViewDidLoad()
{
base.ViewDidLoad();
NavItem.Title = AppResources.SearchVault;
CancelBarButton.Title = AppResources.Cancel;
SearchBar.Placeholder = AppResources.Search;
if(!ThemeHelpers.LightTheme)
{
SearchBar.BackgroundColor = SearchBar.BarTintColor = ThemeHelpers.BackgroundColor;
}
TableView.RowHeight = UITableView.AutomaticDimension;
TableView.EstimatedRowHeight = 44;

View File

@@ -8,30 +8,24 @@ namespace Bit.iOS.Autofill
{
public partial class SetupViewController : ExtendedUIViewController
{
public SetupViewController(IntPtr handle) : base(handle)
public SetupViewController(IntPtr handle)
: base(handle)
{ }
public CredentialProviderViewController CPViewController { get; set; }
public override void ViewWillAppear(bool animated)
{
UINavigationBar.Appearance.ShadowImage = new UIImage();
UINavigationBar.Appearance.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
base.ViewWillAppear(animated);
}
public override void ViewDidLoad()
{
View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f);
var descriptor = UIFontDescriptor.PreferredBody;
DescriptionLabel.Text = $@"{AppResources.AutofillSetup}
{AppResources.AutofillSetup2}";
DescriptionLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize);
DescriptionLabel.TextColor = new UIColor(red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f);
DescriptionLabel.TextColor = ThemeHelpers.MutedColor;
ActivatedLabel.Text = AppResources.AutofillActivated;
ActivatedLabel.Font = UIFont.FromDescriptor(descriptor, descriptor.PointSize * 1.3f);
ActivatedLabel.TextColor = ThemeHelpers.SuccessColor;
BackButton.Title = AppResources.Back;
base.ViewDidLoad();