mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 15:21:53 +03:00
share icon on vault listing
This commit is contained in:
parent
2d7b33459e
commit
4854b2b1c0
10 changed files with 49 additions and 13 deletions
|
@ -825,6 +825,21 @@
|
|||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\search.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable\share.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-hdpi\share.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xhdpi\share.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xxhdpi\share.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\drawable-xxxhdpi\share.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">
|
||||
|
|
21
src/Android/Resources/Resource.Designer.cs
generated
21
src/Android/Resources/Resource.Designer.cs
generated
|
@ -2742,8 +2742,8 @@ namespace Bit.Android
|
|||
// aapt resource value: 0x7f0200e4
|
||||
public const int notification_sm = 2130837732;
|
||||
|
||||
// aapt resource value: 0x7f0200f1
|
||||
public const int notification_template_icon_bg = 2130837745;
|
||||
// aapt resource value: 0x7f0200f2
|
||||
public const int notification_template_icon_bg = 2130837746;
|
||||
|
||||
// aapt resource value: 0x7f0200e5
|
||||
public const int plus = 2130837733;
|
||||
|
@ -2761,25 +2761,28 @@ namespace Bit.Android
|
|||
public const int search = 2130837737;
|
||||
|
||||
// aapt resource value: 0x7f0200ea
|
||||
public const int splash_screen = 2130837738;
|
||||
public const int share = 2130837738;
|
||||
|
||||
// aapt resource value: 0x7f0200eb
|
||||
public const int star = 2130837739;
|
||||
public const int splash_screen = 2130837739;
|
||||
|
||||
// aapt resource value: 0x7f0200ec
|
||||
public const int star_selected = 2130837740;
|
||||
public const int star = 2130837740;
|
||||
|
||||
// aapt resource value: 0x7f0200ed
|
||||
public const int tools = 2130837741;
|
||||
public const int star_selected = 2130837741;
|
||||
|
||||
// aapt resource value: 0x7f0200ee
|
||||
public const int tools_selected = 2130837742;
|
||||
public const int tools = 2130837742;
|
||||
|
||||
// aapt resource value: 0x7f0200ef
|
||||
public const int upload = 2130837743;
|
||||
public const int tools_selected = 2130837743;
|
||||
|
||||
// aapt resource value: 0x7f0200f0
|
||||
public const int user = 2130837744;
|
||||
public const int upload = 2130837744;
|
||||
|
||||
// aapt resource value: 0x7f0200f1
|
||||
public const int user = 2130837745;
|
||||
|
||||
static Drawable()
|
||||
{
|
||||
|
|
BIN
src/Android/Resources/drawable-hdpi/share.png
Normal file
BIN
src/Android/Resources/drawable-hdpi/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 286 B |
BIN
src/Android/Resources/drawable-xhdpi/share.png
Normal file
BIN
src/Android/Resources/drawable-xhdpi/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 683 B |
BIN
src/Android/Resources/drawable-xxhdpi/share.png
Normal file
BIN
src/Android/Resources/drawable-xxhdpi/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 481 B |
BIN
src/Android/Resources/drawable-xxxhdpi/share.png
Normal file
BIN
src/Android/Resources/drawable-xxxhdpi/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
src/Android/Resources/drawable/share.png
Normal file
BIN
src/Android/Resources/drawable/share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 381 B |
|
@ -1,4 +1,5 @@
|
|||
using Xamarin.Forms;
|
||||
using FFImageLoading.Forms;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
|
@ -19,6 +20,14 @@ namespace Bit.App.Controls
|
|||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
};
|
||||
|
||||
LabelIcon = new CachedImage
|
||||
{
|
||||
WidthRequest = 16,
|
||||
HeightRequest = 16,
|
||||
HorizontalOptions = LayoutOptions.Start,
|
||||
Margin = new Thickness(5, 0, 0, 0)
|
||||
};
|
||||
|
||||
Button = new ExtendedButton
|
||||
{
|
||||
WidthRequest = 60
|
||||
|
@ -32,11 +41,14 @@ namespace Bit.App.Controls
|
|||
};
|
||||
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
|
||||
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
|
||||
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) });
|
||||
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
|
||||
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(60, GridUnitType.Absolute) });
|
||||
grid.Children.Add(Label, 0, 0);
|
||||
grid.Children.Add(Detail, 0, 1);
|
||||
grid.Children.Add(Button, 1, 0);
|
||||
grid.Children.Add(LabelIcon, 1, 0);
|
||||
grid.Children.Add(Button, 2, 0);
|
||||
Grid.SetColumnSpan(Detail, 2);
|
||||
Grid.SetRowSpan(Button, 2);
|
||||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
|
@ -49,6 +61,7 @@ namespace Bit.App.Controls
|
|||
|
||||
public Label Label { get; private set; }
|
||||
public Label Detail { get; private set; }
|
||||
public CachedImage LabelIcon { get; private set; }
|
||||
public Button Button { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,13 +12,16 @@ namespace Bit.App.Controls
|
|||
public VaultListViewCell(Action<VaultListPageModel.Login> moreClickedAction)
|
||||
{
|
||||
SetBinding(LoginParameterProperty, new Binding("."));
|
||||
Label.SetBinding<VaultListPageModel.Login>(Label.TextProperty, s => s.Name);
|
||||
Detail.SetBinding<VaultListPageModel.Login>(Label.TextProperty, s => s.Username);
|
||||
Label.SetBinding<VaultListPageModel.Login>(Label.TextProperty, l => l.Name);
|
||||
Detail.SetBinding<VaultListPageModel.Login>(Label.TextProperty, l => l.Username);
|
||||
LabelIcon.SetBinding<VaultListPageModel.Login>(VisualElement.IsVisibleProperty, l => l.Shared);
|
||||
|
||||
Button.Image = "more";
|
||||
Button.Command = new Command(() => moreClickedAction?.Invoke(LoginParameter));
|
||||
Button.BackgroundColor = Color.Transparent;
|
||||
|
||||
LabelIcon.Source = "share";
|
||||
|
||||
BackgroundColor = Color.White;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace Bit.App.Models.Page
|
|||
public Login(Models.Login login)
|
||||
{
|
||||
Id = login.Id;
|
||||
Shared = !string.IsNullOrWhiteSpace(login.OrganizationId);
|
||||
FolderId = login.FolderId;
|
||||
Name = login.Name?.Decrypt(login.OrganizationId);
|
||||
Username = login.Username?.Decrypt(login.OrganizationId) ?? " ";
|
||||
|
@ -19,6 +20,7 @@ namespace Bit.App.Models.Page
|
|||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public bool Shared { get; set; }
|
||||
public string FolderId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
|
Loading…
Reference in a new issue