Tools share cell

This commit is contained in:
Kyle Spearrin 2017-04-25 14:48:42 -04:00
parent 0684dfe869
commit 15a9f80430
14 changed files with 71 additions and 9 deletions

View file

@ -840,6 +840,21 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\share.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\share_tools.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\share_tools.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\share_tools.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\share_tools.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\share_tools.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View file

@ -2742,8 +2742,8 @@ namespace Bit.Android
// aapt resource value: 0x7f0200e4
public const int notification_sm = 2130837732;
// aapt resource value: 0x7f0200f2
public const int notification_template_icon_bg = 2130837746;
// aapt resource value: 0x7f0200f3
public const int notification_template_icon_bg = 2130837747;
// aapt resource value: 0x7f0200e5
public const int plus = 2130837733;
@ -2764,25 +2764,28 @@ namespace Bit.Android
public const int share = 2130837738;
// aapt resource value: 0x7f0200eb
public const int splash_screen = 2130837739;
public const int share_tools = 2130837739;
// aapt resource value: 0x7f0200ec
public const int star = 2130837740;
public const int splash_screen = 2130837740;
// aapt resource value: 0x7f0200ed
public const int star_selected = 2130837741;
public const int star = 2130837741;
// aapt resource value: 0x7f0200ee
public const int tools = 2130837742;
public const int star_selected = 2130837742;
// aapt resource value: 0x7f0200ef
public const int tools_selected = 2130837743;
public const int tools = 2130837743;
// aapt resource value: 0x7f0200f0
public const int upload = 2130837744;
public const int tools_selected = 2130837744;
// aapt resource value: 0x7f0200f1
public const int user = 2130837745;
public const int upload = 2130837745;
// aapt resource value: 0x7f0200f2
public const int user = 2130837746;
static Drawable()
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

View file

@ -25,6 +25,7 @@ namespace Bit.App.Pages
public ToolsViewCell GeneratorCell { get; set; }
public ToolsViewCell WebCell { get; set; }
public ToolsViewCell ShareCell { get; set; }
public ToolsViewCell ImportCell { get; set; }
public ToolsViewCell ExtensionCell { get; set; }
public ToolsViewCell AutofillCell { get; set; }
@ -34,6 +35,7 @@ namespace Bit.App.Pages
GeneratorCell = new ToolsViewCell(AppResources.PasswordGenerator, AppResources.PasswordGeneratorDescription,
"refresh");
WebCell = new ToolsViewCell(AppResources.WebVault, AppResources.WebVaultDescription, "globe");
ShareCell = new ToolsViewCell(AppResources.ShareVault, AppResources.ShareVaultDescription, "share_tools");
ImportCell = new ToolsViewCell(AppResources.ImportLogins, AppResources.ImportLoginsDescription, "cloudup");
var section = new TableSection(" ") { GeneratorCell };
@ -53,6 +55,7 @@ namespace Bit.App.Pages
}
section.Add(WebCell);
section.Add(ShareCell);
section.Add(ImportCell);
var table = new ExtendedTableView
@ -81,6 +84,7 @@ namespace Bit.App.Pages
base.OnAppearing();
GeneratorCell.Tapped += GeneratorCell_Tapped;
WebCell.Tapped += WebCell_Tapped;
ShareCell.Tapped += ShareCell_Tapped;
ImportCell.Tapped += ImportCell_Tapped;
if(ExtensionCell != null)
{
@ -97,6 +101,7 @@ namespace Bit.App.Pages
base.OnDisappearing();
GeneratorCell.Tapped -= GeneratorCell_Tapped;
WebCell.Tapped -= WebCell_Tapped;
ShareCell.Tapped -= ShareCell_Tapped;
ImportCell.Tapped -= ImportCell_Tapped;
if(ExtensionCell != null)
{
@ -130,6 +135,12 @@ namespace Bit.App.Pages
Device.OpenUri(new Uri("https://vault.bitwarden.com"));
}
private void ShareCell_Tapped(object sender, EventArgs e)
{
_googleAnalyticsService.TrackAppEvent("OpenedTool", "Share");
Device.OpenUri(new Uri("https://vault.bitwarden.com/#/?org=free"));
}
private async void ImportCell_Tapped(object sender, EventArgs e)
{
if(!await _userDialogs.ConfirmAsync(AppResources.ImportLoginsConfirmation, null, AppResources.Yes,

View file

@ -1663,6 +1663,24 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Share Your Vault.
/// </summary>
public static string ShareVault {
get {
return ResourceManager.GetString("ShareVault", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Create an organization to securely share your logins with other users..
/// </summary>
public static string ShareVaultDescription {
get {
return ResourceManager.GetString("ShareVaultDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show.
/// </summary>

View file

@ -819,4 +819,10 @@
<data name="BitwardenAutofillServiceSearch" xml:space="preserve">
<value>You are searching for an auto-fill login for "{0}".</value>
</data>
<data name="ShareVault" xml:space="preserve">
<value>Share Your Vault</value>
</data>
<data name="ShareVaultDescription" xml:space="preserve">
<value>Create an organization to securely share your logins with other users.</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -702,6 +702,15 @@
<ItemGroup>
<BundleResource Include="Resources\share.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\share_tools.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\share_tools%402x.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\share_tools%403x.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>