1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00

stubbed out tools page and moved sync to settings

This commit is contained in:
Kyle Spearrin 2016-06-30 22:04:45 -04:00
parent f1ef1a0ce0
commit 94f7f715e6
6 changed files with 65 additions and 7 deletions

View File

@ -109,6 +109,7 @@
<Compile Include="Pages\MainPage.cs" />
<Compile Include="Pages\SettingsEditFolderPage.cs" />
<Compile Include="Pages\LockFingerprintPage.cs" />
<Compile Include="Pages\ToolsPage.cs" />
<Compile Include="Pages\SyncPage.cs" />
<Compile Include="Pages\SettingsPage.cs" />
<Compile Include="Pages\SettingsListFoldersPage.cs" />

View File

@ -15,7 +15,7 @@ namespace Bit.App.Pages
var settingsNavigation = new ExtendedNavigationPage(new SettingsPage());
var favoritesNavigation = new ExtendedNavigationPage(new VaultListSitesPage(true));
var vaultNavigation = new ExtendedNavigationPage(new VaultListSitesPage(false));
var syncNavigation = new ExtendedNavigationPage(new SyncPage());
var toolsNavigation = new ExtendedNavigationPage(new ToolsPage());
favoritesNavigation.Title = AppResources.Favorites;
favoritesNavigation.Icon = "star";
@ -23,15 +23,15 @@ namespace Bit.App.Pages
vaultNavigation.Title = AppResources.MyVault;
vaultNavigation.Icon = "fa-lock";
syncNavigation.Title = AppResources.Sync;
syncNavigation.Icon = "fa-refresh";
toolsNavigation.Title = AppResources.Tools;
toolsNavigation.Icon = "fa-refresh";
settingsNavigation.Title = AppResources.Settings;
settingsNavigation.Icon = "cogs";
Children.Add(favoritesNavigation);
Children.Add(vaultNavigation);
Children.Add(syncNavigation);
Children.Add(toolsNavigation);
Children.Add(settingsNavigation);
}
}

View File

@ -63,7 +63,8 @@ namespace Bit.App.Pages
var changeMasterPasswordCell = new ExtendedTextCell
{
Text = "Change Master Password"
Text = "Change Master Password",
ShowDisclousure = true
};
changeMasterPasswordCell.Tapped += ChangeMasterPasswordCell_Tapped;
@ -74,6 +75,13 @@ namespace Bit.App.Pages
};
foldersCell.Tapped += FoldersCell_Tapped;
var syncCell = new ExtendedTextCell
{
Text = "Sync",
ShowDisclousure = true
};
syncCell.Tapped += SyncCell_Tapped;
var lockCell = new ExtendedTextCell
{
Text = "Lock"
@ -100,9 +108,10 @@ namespace Bit.App.Pages
PinCell,
changeMasterPasswordCell
},
new TableSection("Manage Folders")
new TableSection("Manage")
{
foldersCell
foldersCell,
syncCell
},
new TableSection("Current Session")
{
@ -164,6 +173,11 @@ namespace Bit.App.Pages
LockOptionsCell.Detail = selection;
}
private void SyncCell_Tapped(object sender, EventArgs e)
{
Navigation.PushAsync(new SyncPage());
}
private void LockCell_Tapped(object sender, EventArgs e)
{
MessagingCenter.Send(Application.Current, "Lock", true);

View File

@ -0,0 +1,30 @@
using System;
using System.Threading.Tasks;
using Acr.UserDialogs;
using Bit.App.Abstractions;
using Bit.App.Controls;
using Bit.App.Resources;
using Plugin.Connectivity.Abstractions;
using Xamarin.Forms;
using XLabs.Ioc;
namespace Bit.App.Pages
{
public class ToolsPage : ExtendedContentPage
{
private readonly IUserDialogs _userDialogs;
public ToolsPage()
{
_userDialogs = Resolver.Resolve<IUserDialogs>();
Init();
}
public void Init()
{
Title = AppResources.Tools;
Icon = "fa-refresh";
}
}
}

View File

@ -412,6 +412,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Tools.
/// </summary>
internal static string Tools {
get {
return ResourceManager.GetString("Tools", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to URI.
/// </summary>

View File

@ -271,6 +271,10 @@
<value>Sync</value>
<comment>The title for the sync page.</comment>
</data>
<data name="Tools" xml:space="preserve">
<value>Tools</value>
<comment>The title for the tools page.</comment>
</data>
<data name="URI" xml:space="preserve">
<value>URI</value>
<comment>Label for a uri/url.</comment>