mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using Bit.App.Utilities;
|
|
using Bit.Core.Abstractions;
|
|
using Bit.Core.Utilities;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
using Xamarin.Forms;
|
|
|
|
namespace Bit.App.Pages
|
|
{
|
|
public partial class HomePage : BaseContentPage
|
|
{
|
|
private IMessagingService _messagingService;
|
|
|
|
public HomePage()
|
|
{
|
|
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
|
|
_messagingService.Send("showStatusBar", false);
|
|
InitializeComponent();
|
|
_logo.Source = !ThemeManager.UsingLightTheme ? "logo_white.png" : "logo.png";
|
|
}
|
|
|
|
public async Task DismissRegisterPageAndLogInAsync(string email)
|
|
{
|
|
await Navigation.PopModalAsync();
|
|
await Navigation.PushModalAsync(new NavigationPage(new LoginPage(email)));
|
|
}
|
|
|
|
protected override void OnAppearing()
|
|
{
|
|
base.OnAppearing();
|
|
_messagingService.Send("showStatusBar", false);
|
|
}
|
|
|
|
private void LogIn_Clicked(object sender, EventArgs e)
|
|
{
|
|
if(DoOnce())
|
|
{
|
|
Navigation.PushModalAsync(new NavigationPage(new LoginPage()));
|
|
}
|
|
}
|
|
|
|
private void Register_Clicked(object sender, EventArgs e)
|
|
{
|
|
if(DoOnce())
|
|
{
|
|
Navigation.PushModalAsync(new NavigationPage(new RegisterPage(this)));
|
|
}
|
|
}
|
|
|
|
private void Settings_Clicked(object sender, EventArgs e)
|
|
{
|
|
if(DoOnce())
|
|
{
|
|
Navigation.PushModalAsync(new NavigationPage(new EnvironmentPage()));
|
|
}
|
|
}
|
|
}
|
|
}
|