-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathSignInTokenPage.xaml
More file actions
99 lines (86 loc) · 3.34 KB
/
Copy pathSignInTokenPage.xaml
File metadata and controls
99 lines (86 loc) · 3.34 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
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="Coder.Desktop.App.Views.Pages.SignInTokenPage"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel
Orientation="Vertical"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Padding="20"
Spacing="10">
<TextBlock
Text="Coder Desktop"
FontSize="24"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<TextBlock
Grid.Column="0"
Grid.Row="0"
Text="Server URL"
HorizontalAlignment="Right"
Padding="10" />
<TextBlock
Grid.Column="1"
Grid.Row="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Padding="10"
Text="{x:Bind ViewModel.CoderUrl, Mode=OneWay}" />
<TextBlock
Grid.Column="0"
Grid.Row="2"
Text="Session Token"
HorizontalAlignment="Right"
Padding="10" />
<PasswordBox
Grid.Column="1"
Grid.Row="2"
HorizontalAlignment="Stretch"
PlaceholderText="Paste your token here"
KeyDown="PasswordBox_KeyDown"
LostFocus="{x:Bind ViewModel.ApiToken_FocusLost, Mode=OneWay}"
Password="{x:Bind ViewModel.ApiToken, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock
Grid.Column="1"
Grid.Row="3"
Text="{x:Bind ViewModel.ApiTokenError, Mode=OneWay}"
Foreground="Red" />
<HyperlinkButton
Grid.Column="1"
Grid.Row="4"
Content="Generate a token via the Web UI"
NavigateUri="{x:Bind ViewModel.GenTokenUrl, Mode=OneWay}" />
</Grid>
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Center"
Spacing="10">
<Button
Content="Back" HorizontalAlignment="Right"
Command="{x:Bind ViewModel.TokenPage_BackCommand, Mode=OneWay}"
CommandParameter="{x:Bind SignInWindow}" />
<Button
Content="Sign In"
HorizontalAlignment="Left"
Style="{StaticResource AccentButtonStyle}"
Command="{x:Bind ViewModel.TokenPage_SignInCommand, Mode=OneWay}"
CommandParameter="{x:Bind SignInWindow}" />
</StackPanel>
</StackPanel>
</Page>