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

added new pages to settings. rearranged security section for settings.

This commit is contained in:
Kyle Spearrin 2016-07-23 02:48:56 -04:00
parent cf27ace05e
commit 7113bcca51
4 changed files with 98 additions and 3 deletions

View File

@ -113,11 +113,13 @@
<Compile Include="Pages\LoginTwoFactorPage.cs" />
<Compile Include="Pages\PasswordHintPage.cs" />
<Compile Include="Pages\RegisterPage.cs" />
<Compile Include="Pages\Settings\SettingsHelpPage.cs" />
<Compile Include="Pages\Settings\SettingsPinPage.cs" />
<Compile Include="Pages\Lock\LockPinPage.cs" />
<Compile Include="Pages\MainPage.cs" />
<Compile Include="Pages\Settings\SettingsEditFolderPage.cs" />
<Compile Include="Pages\Lock\LockFingerprintPage.cs" />
<Compile Include="Pages\Settings\SettingsAboutPage.cs" />
<Compile Include="Pages\Tools\ToolsExtensionPage.cs" />
<Compile Include="Pages\Tools\ToolsPasswordGeneratorSettingsPage.cs" />
<Compile Include="Pages\Tools\ToolsPasswordGeneratorPage.cs" />

View File

@ -0,0 +1,24 @@
using System;
using Bit.App.Controls;
using Xamarin.Forms;
namespace Bit.App.Pages
{
public class SettingsAboutPage : ExtendedContentPage
{
public SettingsAboutPage()
{
Init();
}
public void Init()
{
// TODO: version, credits, etc
var stackLayout = new StackLayout { };
Title = "About bitwarden";
Content = stackLayout;
}
}
}

View File

@ -0,0 +1,24 @@
using System;
using Bit.App.Controls;
using Xamarin.Forms;
namespace Bit.App.Pages
{
public class SettingsHelpPage : ExtendedContentPage
{
public SettingsHelpPage()
{
Init();
}
public void Init()
{
// TODO: hockeyapp feedback, link to website help
var stackLayout = new StackLayout { };
Title = "Help and Support";
Content = stackLayout;
}
}
}

View File

@ -40,7 +40,7 @@ namespace Bit.App.Pages
{
FingerprintCell = new ExtendedSwitchCell
{
Text = "Use Touch ID" + (!_fingerprint.IsAvailable ? " (Unavilable)" : null),
Text = "Unlock with Touch ID" + (!_fingerprint.IsAvailable ? " (Unavilable)" : null),
On = _settings.GetValueOrDefault<bool>(Constants.SettingFingerprintUnlockOn),
IsEnabled = _fingerprint.IsAvailable
};
@ -48,7 +48,7 @@ namespace Bit.App.Pages
PinCell = new ExtendedSwitchCell
{
Text = "Use PIN Code",
Text = "Unlock with PIN Code",
On = _settings.GetValueOrDefault<bool>(Constants.SettingPinUnlockOn)
};
PinCell.OnChanged += PinCell_Changed;
@ -101,6 +101,27 @@ namespace Bit.App.Pages
};
logOutCell.Tapped += LogOutCell_Tapped;
var aboutCell = new ExtendedTextCell
{
Text = "About",
ShowDisclousure = true
};
aboutCell.Tapped += AboutCell_Tapped;
var helpCell = new ExtendedTextCell
{
Text = "Help and Support",
ShowDisclousure = true
};
helpCell.Tapped += HelpCell_Tapped;
var rateCell = new ExtendedTextCell
{
Text = "Rate bitwarden",
ShowDisclousure = true
};
rateCell.Tapped += RateCell_Tapped;
var table = new ExtendedTableView
{
EnableScrolling = true,
@ -112,7 +133,10 @@ namespace Bit.App.Pages
{
LockOptionsCell,
FingerprintCell,
PinCell,
PinCell
},
new TableSection
{
changeMasterPasswordCell,
changeEmailCell
},
@ -125,6 +149,12 @@ namespace Bit.App.Pages
{
lockCell,
logOutCell
},
new TableSection("Other")
{
helpCell,
aboutCell,
rateCell
}
}
};
@ -186,6 +216,21 @@ namespace Bit.App.Pages
Navigation.PushAsync(new SettingsSyncPage());
}
private void AboutCell_Tapped(object sender, EventArgs e)
{
Navigation.PushAsync(new SettingsAboutPage());
}
private void RateCell_Tapped(object sender, EventArgs e)
{
// TODO: link to app stores
}
private void HelpCell_Tapped(object sender, EventArgs e)
{
Navigation.PushAsync(new SettingsHelpPage());
}
private void LockCell_Tapped(object sender, EventArgs e)
{
_settings.AddOrUpdateValue(Constants.SettingLocked, true);