mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
added new pages to settings. rearranged security section for settings.
This commit is contained in:
parent
cf27ace05e
commit
7113bcca51
4 changed files with 98 additions and 3 deletions
|
@ -113,11 +113,13 @@
|
||||||
<Compile Include="Pages\LoginTwoFactorPage.cs" />
|
<Compile Include="Pages\LoginTwoFactorPage.cs" />
|
||||||
<Compile Include="Pages\PasswordHintPage.cs" />
|
<Compile Include="Pages\PasswordHintPage.cs" />
|
||||||
<Compile Include="Pages\RegisterPage.cs" />
|
<Compile Include="Pages\RegisterPage.cs" />
|
||||||
|
<Compile Include="Pages\Settings\SettingsHelpPage.cs" />
|
||||||
<Compile Include="Pages\Settings\SettingsPinPage.cs" />
|
<Compile Include="Pages\Settings\SettingsPinPage.cs" />
|
||||||
<Compile Include="Pages\Lock\LockPinPage.cs" />
|
<Compile Include="Pages\Lock\LockPinPage.cs" />
|
||||||
<Compile Include="Pages\MainPage.cs" />
|
<Compile Include="Pages\MainPage.cs" />
|
||||||
<Compile Include="Pages\Settings\SettingsEditFolderPage.cs" />
|
<Compile Include="Pages\Settings\SettingsEditFolderPage.cs" />
|
||||||
<Compile Include="Pages\Lock\LockFingerprintPage.cs" />
|
<Compile Include="Pages\Lock\LockFingerprintPage.cs" />
|
||||||
|
<Compile Include="Pages\Settings\SettingsAboutPage.cs" />
|
||||||
<Compile Include="Pages\Tools\ToolsExtensionPage.cs" />
|
<Compile Include="Pages\Tools\ToolsExtensionPage.cs" />
|
||||||
<Compile Include="Pages\Tools\ToolsPasswordGeneratorSettingsPage.cs" />
|
<Compile Include="Pages\Tools\ToolsPasswordGeneratorSettingsPage.cs" />
|
||||||
<Compile Include="Pages\Tools\ToolsPasswordGeneratorPage.cs" />
|
<Compile Include="Pages\Tools\ToolsPasswordGeneratorPage.cs" />
|
||||||
|
|
24
src/App/Pages/Settings/SettingsAboutPage.cs
Normal file
24
src/App/Pages/Settings/SettingsAboutPage.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
src/App/Pages/Settings/SettingsHelpPage.cs
Normal file
24
src/App/Pages/Settings/SettingsHelpPage.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -40,7 +40,7 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
FingerprintCell = new ExtendedSwitchCell
|
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),
|
On = _settings.GetValueOrDefault<bool>(Constants.SettingFingerprintUnlockOn),
|
||||||
IsEnabled = _fingerprint.IsAvailable
|
IsEnabled = _fingerprint.IsAvailable
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
PinCell = new ExtendedSwitchCell
|
PinCell = new ExtendedSwitchCell
|
||||||
{
|
{
|
||||||
Text = "Use PIN Code",
|
Text = "Unlock with PIN Code",
|
||||||
On = _settings.GetValueOrDefault<bool>(Constants.SettingPinUnlockOn)
|
On = _settings.GetValueOrDefault<bool>(Constants.SettingPinUnlockOn)
|
||||||
};
|
};
|
||||||
PinCell.OnChanged += PinCell_Changed;
|
PinCell.OnChanged += PinCell_Changed;
|
||||||
|
@ -101,6 +101,27 @@ namespace Bit.App.Pages
|
||||||
};
|
};
|
||||||
logOutCell.Tapped += LogOutCell_Tapped;
|
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
|
var table = new ExtendedTableView
|
||||||
{
|
{
|
||||||
EnableScrolling = true,
|
EnableScrolling = true,
|
||||||
|
@ -112,7 +133,10 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
LockOptionsCell,
|
LockOptionsCell,
|
||||||
FingerprintCell,
|
FingerprintCell,
|
||||||
PinCell,
|
PinCell
|
||||||
|
},
|
||||||
|
new TableSection
|
||||||
|
{
|
||||||
changeMasterPasswordCell,
|
changeMasterPasswordCell,
|
||||||
changeEmailCell
|
changeEmailCell
|
||||||
},
|
},
|
||||||
|
@ -125,6 +149,12 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
lockCell,
|
lockCell,
|
||||||
logOutCell
|
logOutCell
|
||||||
|
},
|
||||||
|
new TableSection("Other")
|
||||||
|
{
|
||||||
|
helpCell,
|
||||||
|
aboutCell,
|
||||||
|
rateCell
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -186,6 +216,21 @@ namespace Bit.App.Pages
|
||||||
Navigation.PushAsync(new SettingsSyncPage());
|
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)
|
private void LockCell_Tapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_settings.AddOrUpdateValue(Constants.SettingLocked, true);
|
_settings.AddOrUpdateValue(Constants.SettingLocked, true);
|
||||||
|
|
Loading…
Reference in a new issue