2016-05-03 00:50:16 +03:00
|
|
|
|
using System;
|
2016-05-10 06:25:37 +03:00
|
|
|
|
using Bit.App.Controls;
|
2016-05-07 20:42:09 +03:00
|
|
|
|
using Bit.App.Resources;
|
2016-05-03 00:50:16 +03:00
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
namespace Bit.App.Pages
|
|
|
|
|
{
|
2016-05-10 06:25:37 +03:00
|
|
|
|
public class MainPage : ExtendedTabbedPage
|
2016-05-03 00:50:16 +03:00
|
|
|
|
{
|
2017-11-17 21:03:43 +03:00
|
|
|
|
public MainPage(bool myVault = false)
|
2016-05-03 00:50:16 +03:00
|
|
|
|
{
|
2016-07-08 03:53:01 +03:00
|
|
|
|
TintColor = Color.FromHex("3c8dbc");
|
2016-05-10 06:25:37 +03:00
|
|
|
|
|
2016-05-13 07:11:32 +03:00
|
|
|
|
var settingsNavigation = new ExtendedNavigationPage(new SettingsPage());
|
2017-11-17 21:03:43 +03:00
|
|
|
|
var favoritesNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(true));
|
2017-11-25 07:15:25 +03:00
|
|
|
|
var vaultNavigation = new ExtendedNavigationPage(new VaultListGroupingsPage());
|
2016-07-01 05:04:45 +03:00
|
|
|
|
var toolsNavigation = new ExtendedNavigationPage(new ToolsPage());
|
2016-05-06 07:17:38 +03:00
|
|
|
|
|
2017-10-03 05:15:13 +03:00
|
|
|
|
favoritesNavigation.Icon = "star.png";
|
|
|
|
|
vaultNavigation.Icon = "fa_lock.png";
|
|
|
|
|
toolsNavigation.Icon = "tools.png";
|
|
|
|
|
settingsNavigation.Icon = "cogs.png";
|
2016-05-03 00:50:16 +03:00
|
|
|
|
|
2016-06-14 05:04:25 +03:00
|
|
|
|
Children.Add(favoritesNavigation);
|
2016-05-03 00:50:16 +03:00
|
|
|
|
Children.Add(vaultNavigation);
|
2016-07-01 05:04:45 +03:00
|
|
|
|
Children.Add(toolsNavigation);
|
2016-05-03 00:50:16 +03:00
|
|
|
|
Children.Add(settingsNavigation);
|
2017-08-02 05:11:00 +03:00
|
|
|
|
|
2017-11-17 21:03:43 +03:00
|
|
|
|
if(myVault)
|
2017-08-02 05:11:00 +03:00
|
|
|
|
{
|
|
|
|
|
SelectedItem = vaultNavigation;
|
|
|
|
|
}
|
2016-05-03 00:50:16 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|