From 9b2ce98b4607b4ad049727259df552f6e2ee0995 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 26 Apr 2019 21:53:39 -0400 Subject: [PATCH] view page updates --- src/App/Models/ViewFieldViewModel.cs | 25 +++++++++++++++++++ src/App/Pages/Vault/ViewPage.xaml | 29 +++++++++++++++++------ src/App/Pages/Vault/ViewPageViewModel.cs | 10 ++++++++ src/App/Utilities/InverseBoolConverter.cs | 28 ++++++++++++++++++++++ 4 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 src/App/Models/ViewFieldViewModel.cs create mode 100644 src/App/Utilities/InverseBoolConverter.cs diff --git a/src/App/Models/ViewFieldViewModel.cs b/src/App/Models/ViewFieldViewModel.cs new file mode 100644 index 000000000..e3bd62961 --- /dev/null +++ b/src/App/Models/ViewFieldViewModel.cs @@ -0,0 +1,25 @@ +using Bit.App.Pages; +using Bit.Core.Models.View; + +namespace Bit.App.Models +{ + public class ViewFieldViewModel : BaseViewModel + { + private FieldView _field; + + public ViewFieldViewModel(FieldView field) + { + Field = field; + } + + public FieldView Field + { + get => _field; + set => SetProperty(ref _field, value, + additionalPropertyNames: new string[] + { + + }); + } + } +} diff --git a/src/App/Pages/Vault/ViewPage.xaml b/src/App/Pages/Vault/ViewPage.xaml index d64e29036..a52f37656 100644 --- a/src/App/Pages/Vault/ViewPage.xaml +++ b/src/App/Pages/Vault/ViewPage.xaml @@ -7,6 +7,7 @@ xmlns:u="clr-namespace:Bit.App.Utilities" xmlns:controls="clr-namespace:Bit.App.Controls" xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore" + xmlns:models="clr-namespace:Bit.App.Models" x:DataType="pages:ViewPageViewModel" x:Name="_page" Title="{Binding PageTitle}"> @@ -18,6 +19,12 @@ + + + + + + @@ -167,7 +174,14 @@ Text="{u:I18n URI}" StyleClass="box-label" Grid.Row="0" - Grid.Column="0" /> + Grid.Column="0" + IsVisible="{Binding IsWebsite, Mode=OneWay, Converter={StaticResource inverseBool}}" /> + - + - + @@ -229,12 +244,12 @@