2019-05-07 18:25:21 +03:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<pages:BaseContentPage
|
|
|
|
xmlns="http://xamarin.com/schemas/2014/forms"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
|
|
x:Class="Bit.App.Pages.AddEditPage"
|
|
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
|
|
xmlns:views="clr-namespace:Bit.Core.Models.View;assembly=BitwardenCore"
|
|
|
|
x:DataType="pages:AddEditPageViewModel"
|
|
|
|
x:Name="_page"
|
|
|
|
Title="{Binding PageTitle}">
|
|
|
|
<ContentPage.BindingContext>
|
|
|
|
<pages:AddEditPageViewModel />
|
|
|
|
</ContentPage.BindingContext>
|
|
|
|
|
|
|
|
<ContentPage.ToolbarItems>
|
2019-05-07 19:29:02 +03:00
|
|
|
<ToolbarItem Text="{u:I18n Save}" Clicked="Save_Clicked" />
|
2019-05-07 18:25:21 +03:00
|
|
|
</ContentPage.ToolbarItems>
|
|
|
|
|
|
|
|
<ContentPage.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
|
|
<u:StringHasValueConverter x:Key="stringHasValue" />
|
|
|
|
<u:IsNotNullConverter x:Key="notNull" />
|
|
|
|
</ResourceDictionary>
|
|
|
|
</ContentPage.Resources>
|
|
|
|
|
|
|
|
<ScrollView x:Name="_scrollView">
|
|
|
|
<StackLayout Spacing="20">
|
|
|
|
<StackLayout StyleClass="box">
|
|
|
|
<StackLayout StyleClass="box-row-header">
|
|
|
|
<Label Text="{u:I18n ItemInformation}"
|
|
|
|
StyleClass="box-header, box-header-platform" />
|
|
|
|
</StackLayout>
|
2019-05-08 06:22:55 +03:00
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
2019-05-07 18:25:21 +03:00
|
|
|
<Label
|
|
|
|
Text="{u:I18n Name}"
|
|
|
|
StyleClass="box-label" />
|
2019-05-07 19:29:02 +03:00
|
|
|
<Entry
|
2019-05-07 20:58:50 +03:00
|
|
|
Text="{Binding Cipher.Name}"
|
2019-05-07 18:25:21 +03:00
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
2019-05-08 06:22:55 +03:00
|
|
|
<StackLayout IsVisible="{Binding IsLogin}" Spacing="0" Padding="0">
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n Username}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Login.Username}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<Grid StyleClass="box-row, box-row-input">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n Password}"
|
|
|
|
StyleClass="box-label"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="0" />
|
|
|
|
<controls:MonoEntry
|
|
|
|
Text="{Binding Cipher.Login.Password}"
|
|
|
|
StyleClass="box-value"
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="0"
|
|
|
|
IsPassword="{Binding ShowPassword, Converter={StaticResource inverseBool}}" />
|
|
|
|
<controls:FaButton
|
|
|
|
StyleClass="box-row-button, box-row-button-platform"
|
|
|
|
Text=""
|
|
|
|
Command="{Binding CheckPasswordCommand}"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="1"
|
|
|
|
Grid.RowSpan="2" />
|
|
|
|
<controls:FaButton
|
|
|
|
StyleClass="box-row-button, box-row-button-platform"
|
|
|
|
Text="{Binding ShowPasswordIcon}"
|
|
|
|
Command="{Binding TogglePasswordCommand}"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="2"
|
|
|
|
Grid.RowSpan="2" />
|
|
|
|
<controls:FaButton
|
|
|
|
StyleClass="box-row-button, box-row-button-platform"
|
|
|
|
Text=""
|
|
|
|
Command="{Binding GeneratePasswordCommand}"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="3"
|
|
|
|
Grid.RowSpan="2" />
|
|
|
|
</Grid>
|
|
|
|
<StackLayout StyleClass="box-row">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n AuthenticatorKey}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<controls:MonoEntry
|
|
|
|
Text="{Binding Cipher.Login.Totp}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout IsVisible="{Binding IsCard}" Spacing="0" Padding="0">
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n CardholderName}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Card.CardholderName}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n Number}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Card.Number}"
|
|
|
|
StyleClass="box-value"
|
|
|
|
Keyboard="Numeric" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n Brand}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Picker
|
|
|
|
x:Name="_cardBrandPicker"
|
|
|
|
ItemsSource="{Binding CardBrandOptions}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n ExpirationMonth}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Picker
|
|
|
|
x:Name="_cardExpMonthPicker"
|
|
|
|
ItemsSource="{Binding CardExpMonthOptions}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n ExpirationYear}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Card.ExpYear}"
|
|
|
|
StyleClass="box-value"
|
|
|
|
Keyboard="Numeric" />
|
|
|
|
</StackLayout>
|
|
|
|
<Grid StyleClass="box-row, box-row-input">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n SecurityCode}"
|
|
|
|
StyleClass="box-label"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="0" />
|
|
|
|
<controls:MonoEntry
|
|
|
|
Text="{Binding Cipher.Card.Code}"
|
|
|
|
StyleClass="box-value"
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="0"
|
|
|
|
Keyboard="Numeric"
|
|
|
|
IsPassword="{Binding ShowCardCode, Converter={StaticResource inverseBool}}" />
|
|
|
|
<controls:FaButton
|
|
|
|
StyleClass="box-row-button, box-row-button-platform"
|
|
|
|
Text="{Binding ShowCardCodeIcon}"
|
|
|
|
Command="{Binding ToggleCardCodeCommand}"
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="1"
|
|
|
|
Grid.RowSpan="2" />
|
|
|
|
</Grid>
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout IsVisible="{Binding IsIdentity}" Spacing="0" Padding="0">
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n Title}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Picker
|
|
|
|
x:Name="_identityTitlePicker"
|
|
|
|
ItemsSource="{Binding IdentityTitleOptions}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n FirstName}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Identity.FirstName}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n MiddleName}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Identity.MiddleName}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
<StackLayout StyleClass="box-row, box-row-input">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n LastName}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Entry
|
|
|
|
Text="{Binding Cipher.Identity.LastName}"
|
|
|
|
StyleClass="box-value" />
|
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
2019-05-07 18:25:21 +03:00
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
</ScrollView>
|
|
|
|
|
|
|
|
</pages:BaseContentPage>
|