mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 14:23:26 +00:00
[EC-371] Fix iOS extensions login more menu (#2016)
* EC-371 fix iOS extensions login more menu and HintPage to display correctly on extensions * EC-371 fix merge
This commit is contained in:
committed by
GitHub
parent
570b56364a
commit
3ef5b576ac
@@ -430,7 +430,7 @@ namespace Bit.iOS.Autofill
|
||||
var homePage = new HomePage();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(homePage);
|
||||
ThemeManager.ApplyResourcesTo(homePage);
|
||||
if (homePage.BindingContext is HomeViewModel vm)
|
||||
{
|
||||
vm.StartLoginAction = () => DismissViewController(false, () => LaunchLoginFlow());
|
||||
@@ -453,7 +453,7 @@ namespace Bit.iOS.Autofill
|
||||
var environmentPage = new EnvironmentPage();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(environmentPage);
|
||||
ThemeManager.ApplyResourcesTo(environmentPage);
|
||||
if (environmentPage.BindingContext is EnvironmentPageViewModel vm)
|
||||
{
|
||||
vm.SubmitSuccessAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
@@ -471,7 +471,7 @@ namespace Bit.iOS.Autofill
|
||||
var registerPage = new RegisterPage(null);
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(registerPage);
|
||||
ThemeManager.ApplyResourcesTo(registerPage);
|
||||
if (registerPage.BindingContext is RegisterPageViewModel vm)
|
||||
{
|
||||
vm.RegistrationSuccess = () => DismissViewController(false, () => LaunchLoginFlow(vm.Email));
|
||||
@@ -486,10 +486,11 @@ namespace Bit.iOS.Autofill
|
||||
|
||||
private void LaunchLoginFlow(string email = null)
|
||||
{
|
||||
var loginPage = new LoginPage(email);
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
var appOptions = new AppOptions { IosExtension = true };
|
||||
var app = new App.App(appOptions);
|
||||
var loginPage = new LoginPage(email, appOptions);
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(loginPage);
|
||||
ThemeManager.ApplyResourcesTo(loginPage);
|
||||
if (loginPage.BindingContext is LoginPageViewModel vm)
|
||||
{
|
||||
vm.StartTwoFactorAction = () => DismissViewController(false, () => LaunchTwoFactorFlow(false));
|
||||
@@ -511,7 +512,7 @@ namespace Bit.iOS.Autofill
|
||||
var loginPage = new LoginSsoPage();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(loginPage);
|
||||
ThemeManager.ApplyResourcesTo(loginPage);
|
||||
if (loginPage.BindingContext is LoginSsoPageViewModel vm)
|
||||
{
|
||||
vm.StartTwoFactorAction = () => DismissViewController(false, () => LaunchTwoFactorFlow(true));
|
||||
@@ -534,7 +535,7 @@ namespace Bit.iOS.Autofill
|
||||
var twoFactorPage = new TwoFactorPage(authingWithSso);
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(twoFactorPage);
|
||||
ThemeManager.ApplyResourcesTo(twoFactorPage);
|
||||
if (twoFactorPage.BindingContext is TwoFactorPageViewModel vm)
|
||||
{
|
||||
vm.TwoFactorAuthSuccessAction = () => DismissLockAndContinue();
|
||||
@@ -561,7 +562,7 @@ namespace Bit.iOS.Autofill
|
||||
var setPasswordPage = new SetPasswordPage();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(setPasswordPage);
|
||||
ThemeManager.ApplyResourcesTo(setPasswordPage);
|
||||
if (setPasswordPage.BindingContext is SetPasswordPageViewModel vm)
|
||||
{
|
||||
vm.UpdateTempPasswordAction = () => DismissViewController(false, () => LaunchUpdateTempPasswordFlow());
|
||||
@@ -580,7 +581,7 @@ namespace Bit.iOS.Autofill
|
||||
var updateTempPasswordPage = new UpdateTempPasswordPage();
|
||||
var app = new App.App(new AppOptions { IosExtension = true });
|
||||
ThemeManager.SetTheme(app.Resources);
|
||||
ThemeManager.ApplyResourcesToPage(updateTempPasswordPage);
|
||||
ThemeManager.ApplyResourcesTo(updateTempPasswordPage);
|
||||
if (updateTempPasswordPage.BindingContext is UpdateTempPasswordPageViewModel vm)
|
||||
{
|
||||
vm.UpdateTempPasswordSuccessAction = () => DismissViewController(false, () => LaunchHomePage());
|
||||
|
||||
Reference in New Issue
Block a user