mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 23:54:06 +03:00
35 lines
849 B
C#
35 lines
849 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using Bit.App.Abstractions;
|
|||
|
using Xamarin.Forms;
|
|||
|
using XLabs.Ioc;
|
|||
|
|
|||
|
namespace Bit.App.Pages
|
|||
|
{
|
|||
|
public class SettingsPage : ContentPage
|
|||
|
{
|
|||
|
private ListView _listView = new ListView();
|
|||
|
|
|||
|
public SettingsPage()
|
|||
|
{
|
|||
|
var authService = Resolver.Resolve<IAuthService>();
|
|||
|
|
|||
|
var logoutButton = new Button
|
|||
|
{
|
|||
|
Text = "Log Out",
|
|||
|
Command = new Command(() =>
|
|||
|
{
|
|||
|
authService.LogOut();
|
|||
|
Application.Current.MainPage = new LoginNavigationPage();
|
|||
|
})
|
|||
|
};
|
|||
|
|
|||
|
var stackLayout = new StackLayout { };
|
|||
|
stackLayout.Children.Add(logoutButton);
|
|||
|
|
|||
|
Title = "Settings";
|
|||
|
Content = stackLayout;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|