-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathVaultPreviewRootControl.xaml
More file actions
104 lines (95 loc) · 5.61 KB
/
VaultPreviewRootControl.xaml
File metadata and controls
104 lines (95 loc) · 5.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<UserControl
x:Class="SecureFolderFS.Uno.UserControls.InterfaceRoot.VaultPreviewRootControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:l="using:SecureFolderFS.Uno.Localization"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:not_win="http://uno.ui/not_win"
xmlns:uc="using:SecureFolderFS.Uno.UserControls"
mc:Ignorable="d not_win">
<!-- Root -->
<Grid not_win:Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<!-- Titlebar -->
<uc:TitleBarControl
x:Name="CustomTitleBar"
Grid.Row="0"
x:FieldModifier="public"
Canvas.ZIndex="10"
PrimaryTitle="{x:Bind ViewModel.VaultViewModel.Title, Mode=OneWay, Converter={StaticResource StringInterpolationConverter}, ConverterParameter='inversemode:none|SecureFolderFS - {0}'}" />
<Grid Grid.Row="1" Padding="24">
<!-- Login view -->
<StackPanel
VerticalAlignment="Center"
Spacing="64"
Visibility="{x:Bind ViewModel.VaultViewModel.IsUnlocked, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='invert'}">
<!-- Header -->
<StackPanel Spacing="6">
<TextBlock
HorizontalAlignment="Center"
FontSize="26"
FontWeight="SemiBold"
Text="{x:Bind ViewModel.VaultViewModel.Title, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
ToolTipService.ToolTip="{x:Bind ViewModel.VaultViewModel.Title, Mode=OneWay}" />
<TextBlock
HorizontalAlignment="Center"
FontSize="14"
Opacity="0.6"
Text="{l:ResourceString Rid=VaultLocked}" />
</StackPanel>
<StackPanel VerticalAlignment="Center" Spacing="8">
<uc:LoginControl CurrentViewModel="{x:Bind ViewModel.LoginViewModel.CurrentViewModel, Mode=OneWay}" ProvideContinuationButton="True" />
<uc:LoginOptions
AreCredentialsSaved="{x:Bind ViewModel.LoginViewModel.AreCredentialsSaved, Mode=OneWay}"
AuthenticationOptions="{x:Bind ViewModel.LoginViewModel.AuthenticationOptions, Mode=OneWay}"
DiscardSavedCredentialsCommand="{x:Bind ViewModel.LoginViewModel.DiscardSavedCredentialsCommand, Mode=OneWay}"
IsAlternativeLogin="{x:Bind ViewModel.LoginViewModel.IsAlternativeLogin, Mode=OneWay}"
IsLoginSequence="{x:Bind ViewModel.LoginViewModel.IsLoginSequence, Mode=OneWay}"
IsReadOnly="{x:Bind ViewModel.IsReadOnly, Mode=TwoWay}"
RecoverAccessCommand="{x:Bind ViewModel.RecoverAccessCommand, Mode=OneWay}"
RestartLoginCommand="{x:Bind ViewModel.LoginViewModel.RestartLoginProcessCommand, Mode=OneWay}"
SelectedAuthenticationOption="{x:Bind ViewModel.LoginViewModel.SelectedAuthenticationOption, Mode=TwoWay}"
SelectAuthenticationOptionCommand="{x:Bind ViewModel.LoginViewModel.SelectAuthenticationOptionCommand, Mode=OneWay}"
ShouldSaveCredentials="{x:Bind ViewModel.LoginViewModel.ShouldSaveCredentials, Mode=TwoWay}"
Visibility="{x:Bind ViewModel.LoginViewModel.CurrentViewModel, Mode=OneWay, Converter={StaticResource TypeNameVisibilityConverter}, ConverterParameter='MigrationViewModel,ErrorViewModel|invert'}" />
</StackPanel>
</StackPanel>
<!-- Unlocked view -->
<Grid Visibility="{x:Bind ViewModel.VaultViewModel.IsUnlocked, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Header -->
<StackPanel
Grid.Row="0"
VerticalAlignment="Center"
Spacing="6">
<TextBlock
HorizontalAlignment="Center"
FontSize="26"
FontWeight="SemiBold"
Text="{x:Bind ViewModel.VaultViewModel.Title, Mode=OneWay}"
TextTrimming="CharacterEllipsis"
ToolTipService.ToolTip="{x:Bind ViewModel.VaultViewModel.Title, Mode=OneWay}" />
<TextBlock
HorizontalAlignment="Center"
FontSize="14"
Opacity="0.6"
Text="{l:ResourceString Rid=VaultUnlocked}" />
</StackPanel>
<uc:VaultControls
Grid.Row="1"
VerticalAlignment="Bottom"
IsReadOnly="{x:Bind ViewModel.UnlockedVaultViewModel.Options.IsReadOnly, Mode=OneWay}"
LockVaultCommand="{x:Bind ViewModel.LockVaultCommand, Mode=OneWay}"
RevealFolderCommand="{x:Bind ViewModel.RevealFolderCommand, Mode=OneWay}" />
</Grid>
</Grid>
</Grid>
</UserControl>