-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathSignInPage.xaml
More file actions
121 lines (111 loc) · 5.56 KB
/
Copy pathSignInPage.xaml
File metadata and controls
121 lines (111 loc) · 5.56 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<Page
x:Class="BlueskyClient.Views.SignInPage"
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:ex="using:JeniusApps.Common.UI.Uwp"
xmlns:local="using:BlueskyClient.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:strings="using:BlueskyClient.Strings"
xmlns:winui="using:Microsoft.UI.Xaml.Controls"
winui:BackdropMaterial.ApplyToRootOrPageBackground="True"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<StackPanel Margin="20,0,20,40" VerticalAlignment="Center">
<Image
Width="100"
HorizontalAlignment="Center"
Source="ms-appx:///Assets/AppLogo300.png" />
<TextBlock
x:Name="IdentifierHeader"
Margin="0,20,0,0"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Text="{x:Bind strings:Resources.IdentifierBoxPlaceholder}"
TextWrapping="WrapWholeWords" />
<TextBox
Margin="0,4,0,0"
AutomationProperties.LabeledBy="{x:Bind IdentifierHeader}"
IsEnabled="{x:Bind ex:UIExtensions.Not(ViewModel.SigningIn), Mode=OneWay}"
IsSpellCheckEnabled="False"
PlaceholderText="beeskieapp.bsky.social"
Text="{x:Bind ViewModel.UserHandleInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
x:Name="PasswordHeader"
Margin="0,8,0,0"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Text="{x:Bind strings:Resources.PasswordBoxPlaceholder}"
TextWrapping="WrapWholeWords" />
<PasswordBox
Margin="0,4,0,0"
AutomationProperties.LabeledBy="{x:Bind PasswordHeader}"
IsEnabled="{x:Bind ex:UIExtensions.Not(ViewModel.SigningIn), Mode=OneWay}"
KeyDown="OnPasswordBoxKeyDown"
Password="{x:Bind ViewModel.AppPasswordInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PlaceholderText="••••" />
<Button
Height="48"
Margin="0,8,0,0"
HorizontalAlignment="Stretch"
AutomationProperties.Name="{x:Bind strings:Resources.SignInText}"
Command="{x:Bind ViewModel.SignInCommand}"
Content="{x:Bind strings:Resources.SignInText}"
IsEnabled="{x:Bind ex:UIExtensions.Not(ViewModel.SigningIn), Mode=OneWay}" />
<winui:Expander Header="{x:Bind strings:Resources.AdvancedText}"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Margin="0,8,0,0">
<StackPanel Orientation="Vertical">
<TextBlock
x:Name="PDSHeader"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Text="{x:Bind strings:Resources.PDSBoxPlaceholder}"
TextWrapping="WrapWholeWords" />
<TextBox
Margin="0,4,0,0"
AutomationProperties.LabeledBy="{x:Bind IdentifierHeader}"
IsEnabled="{x:Bind ex:UIExtensions.Not(ViewModel.SigningIn), Mode=OneWay}"
IsSpellCheckEnabled="False"
PlaceholderText="https://bsky.social"
Text="{x:Bind ViewModel.PdsInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</winui:Expander>
</StackPanel>
<winui:InfoBar
Margin="20"
VerticalAlignment="Bottom"
IsOpen="{x:Bind ViewModel.ErrorBannerVisible, Mode=OneWay}"
Message="{x:Bind ViewModel.SignInErrorMessage, Mode=OneWay}"
Severity="Error"
Visibility="Collapsed" />
<HyperlinkButton
Margin="12"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
AutomationProperties.Name="{x:Bind strings:Resources.AppPasswordHelpText}"
Click="OnAppPassHelpClicked"
Content="{x:Bind strings:Resources.AppPasswordHelpText}"
FontSize="12"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
NavigateUri="https://bsky.app/settings/app-passwords" />
</Grid>
<Rectangle
Grid.Column="1"
Width="1"
VerticalAlignment="Stretch"
Fill="{ThemeResource DividerStrokeColorDefaultBrush}" />
<Image
x:Name="BackgroundImage"
Grid.Column="2"
Source="https://images.unsplash.com/photo-1531147646552-1eec68116469?w=2000"
Stretch="UniformToFill" />
</Grid>
</Page>