2020-02-14 22:10:58 +01: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.ExportVaultPage"
|
|
|
|
xmlns:pages="clr-namespace:Bit.App.Pages"
|
|
|
|
xmlns:controls="clr-namespace:Bit.App.Controls"
|
|
|
|
xmlns:u="clr-namespace:Bit.App.Utilities"
|
|
|
|
x:DataType="pages:ExportVaultPageViewModel"
|
|
|
|
Title="{Binding PageTitle}">
|
|
|
|
|
|
|
|
<ContentPage.BindingContext>
|
|
|
|
<pages:ExportVaultPageViewModel />
|
|
|
|
</ContentPage.BindingContext>
|
|
|
|
|
|
|
|
<ContentPage.Resources>
|
|
|
|
<ResourceDictionary>
|
|
|
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
|
|
|
<u:UpperCaseConverter x:Key="toUpper" />
|
|
|
|
</ResourceDictionary>
|
|
|
|
</ContentPage.Resources>
|
|
|
|
|
|
|
|
<ContentPage.ToolbarItems>
|
2021-07-27 15:25:42 +02:00
|
|
|
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" />
|
2020-02-14 22:10:58 +01:00
|
|
|
</ContentPage.ToolbarItems>
|
|
|
|
|
|
|
|
<ScrollView>
|
2021-11-19 15:44:01 +01:00
|
|
|
<StackLayout
|
|
|
|
StyleClass="box"
|
|
|
|
Spacing="20">
|
|
|
|
<Frame
|
|
|
|
IsVisible="{Binding DisablePrivateVaultPolicyEnabled}"
|
|
|
|
Padding="10"
|
|
|
|
Margin="0, 12, 0, 0"
|
|
|
|
HasShadow="False"
|
|
|
|
BackgroundColor="Transparent"
|
|
|
|
BorderColor="Accent">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n DisablePersonalVaultExportPolicyInEffect}"
|
|
|
|
StyleClass="text-muted, text-sm, text-bold"
|
|
|
|
HorizontalTextAlignment="Center" />
|
|
|
|
</Frame>
|
|
|
|
<Grid
|
|
|
|
RowSpacing="10"
|
|
|
|
RowDefinitions="70, Auto, Auto">
|
|
|
|
<StackLayout
|
|
|
|
StyleClass="box-row"
|
|
|
|
Grid.Row="0">
|
2020-02-14 22:10:58 +01:00
|
|
|
<Label
|
|
|
|
Text="{u:I18n FileFormat}"
|
|
|
|
StyleClass="box-label" />
|
|
|
|
<Picker
|
|
|
|
x:Name="_fileFormatPicker"
|
|
|
|
ItemsSource="{Binding FileFormatOptions, Mode=OneTime}"
|
|
|
|
SelectedIndex="{Binding FileFormatSelectedIndex}"
|
2020-12-14 18:56:13 +01:00
|
|
|
SelectedIndexChanged="FileFormat_Changed"
|
2021-09-23 18:30:20 +02:00
|
|
|
StyleClass="box-value"
|
|
|
|
IsEnabled="{Binding DisablePrivateVaultPolicyEnabled, Converter={StaticResource inverseBool}}" />
|
2020-02-14 22:10:58 +01:00
|
|
|
</StackLayout>
|
2021-11-19 15:44:01 +01:00
|
|
|
<StackLayout
|
|
|
|
StyleClass="box-row"
|
|
|
|
Grid.Row="1"
|
|
|
|
IsVisible="{Binding UseOTPVerification}">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n SendVerificationCodeToEmail}"
|
|
|
|
StyleClass="box-label"
|
|
|
|
LineBreakMode="WordWrap"
|
|
|
|
Margin="0,0,0,10" />
|
2021-11-11 02:46:48 +01:00
|
|
|
<Button x:Name="_requestOTP"
|
2021-11-19 15:44:01 +01:00
|
|
|
Text="{u:I18n SendCode}"
|
2021-11-11 02:46:48 +01:00
|
|
|
Clicked="RequestOTP_Clicked"
|
|
|
|
HorizontalOptions="Fill"
|
|
|
|
VerticalOptions="End"
|
|
|
|
IsEnabled="{Binding DisablePrivateVaultPolicyEnabled, Converter={StaticResource inverseBool}}"
|
|
|
|
Margin="0,0,0,10"/>
|
2021-11-19 15:44:01 +01:00
|
|
|
</StackLayout>
|
|
|
|
<Grid
|
|
|
|
StyleClass="box-row"
|
|
|
|
Grid.Row="2"
|
|
|
|
RowDefinitions="Auto,Auto,Auto"
|
|
|
|
ColumnDefinitions="*,Auto"
|
|
|
|
Padding="0">
|
2020-02-14 22:10:58 +01:00
|
|
|
<Label
|
2021-11-11 02:46:48 +01:00
|
|
|
Text="{Binding SecretName}"
|
2020-02-14 22:10:58 +01:00
|
|
|
StyleClass="box-label"
|
2021-11-19 15:44:01 +01:00
|
|
|
Grid.Row="0"
|
|
|
|
Grid.ColumnSpan="2" />
|
2020-02-14 22:10:58 +01:00
|
|
|
<controls:MonoEntry
|
2021-11-11 02:46:48 +01:00
|
|
|
x:Name="_secret"
|
|
|
|
Text="{Binding Secret}"
|
2020-02-14 22:10:58 +01:00
|
|
|
StyleClass="box-value"
|
|
|
|
IsSpellCheckEnabled="False"
|
|
|
|
IsTextPredictionEnabled="False"
|
|
|
|
IsPassword="{Binding ShowPassword, Converter={StaticResource inverseBool}}"
|
2021-09-23 18:30:20 +02:00
|
|
|
IsEnabled="{Binding DisablePrivateVaultPolicyEnabled, Converter={StaticResource inverseBool}}"
|
2021-11-19 15:44:01 +01:00
|
|
|
Grid.Row="1"
|
2020-02-14 22:10:58 +01:00
|
|
|
Grid.Column="0"
|
|
|
|
ReturnType="Go"
|
|
|
|
ReturnCommand="{Binding ExportVaultCommand}" />
|
2022-01-21 10:31:03 +01:00
|
|
|
<controls:IconButton
|
2020-02-14 22:10:58 +01:00
|
|
|
StyleClass="box-row-button, box-row-button-platform"
|
|
|
|
Text="{Binding ShowPasswordIcon}"
|
|
|
|
Command="{Binding TogglePasswordCommand}"
|
2021-11-19 15:44:01 +01:00
|
|
|
Grid.Row="1"
|
2020-02-14 22:10:58 +01:00
|
|
|
Grid.Column="1"
|
|
|
|
AutomationProperties.IsInAccessibleTree="True"
|
2021-11-11 02:46:48 +01:00
|
|
|
AutomationProperties.Name="{u:I18n ToggleVisibility}"
|
|
|
|
IsVisible="{Binding UseOTPVerification, Converter={StaticResource inverseBool}}"/>
|
|
|
|
<Label
|
2021-11-19 15:44:01 +01:00
|
|
|
Text="{u:I18n ConfirmYourIdentity}"
|
|
|
|
StyleClass="box-footer-label"
|
|
|
|
LineBreakMode="WordWrap"
|
|
|
|
Grid.Row="2"
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
IsVisible="{Binding UseOTPVerification}" />
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
<StackLayout
|
|
|
|
StyleClass="box-row">
|
|
|
|
<Label
|
|
|
|
Text="{u:I18n ExportVaultMasterPasswordDescription}"
|
|
|
|
StyleClass="box-footer-label, box-footer-label-switch"
|
|
|
|
IsVisible="{Binding UseOTPVerification, Converter={StaticResource inverseBool}}"/>
|
|
|
|
<Button
|
|
|
|
Text="{u:I18n ExportVault}"
|
|
|
|
Clicked="ExportVault_Clicked"
|
|
|
|
HorizontalOptions="Fill"
|
|
|
|
VerticalOptions="End"
|
|
|
|
IsEnabled="{Binding DisablePrivateVaultPolicyEnabled, Converter={StaticResource inverseBool}}"/>
|
2020-02-14 22:10:58 +01:00
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
</ScrollView>
|
|
|
|
|
|
|
|
</pages:BaseContentPage>
|