|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<Page |
| 3 | + x:Class="Coder.Desktop.App.SignInTokenPage" |
| 4 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 5 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 6 | + xmlns:local="using:Coder.Desktop.App" |
| 7 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + mc:Ignorable="d" |
| 10 | + Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> |
| 11 | + |
| 12 | + <StackPanel |
| 13 | + Orientation="Vertical" |
| 14 | + HorizontalAlignment="Stretch" |
| 15 | + VerticalAlignment="Top" |
| 16 | + Padding="20" |
| 17 | + Spacing="10"> |
| 18 | + |
| 19 | + <TextBlock |
| 20 | + Text="Coder Desktop" |
| 21 | + FontSize="24" |
| 22 | + VerticalAlignment="Center" |
| 23 | + HorizontalAlignment="Center"/> |
| 24 | + |
| 25 | + <Grid> |
| 26 | + <Grid.ColumnDefinitions> |
| 27 | + <ColumnDefinition Width="Auto" /> |
| 28 | + <ColumnDefinition Width="*" /> |
| 29 | + </Grid.ColumnDefinitions> |
| 30 | + <Grid.RowDefinitions> |
| 31 | + <RowDefinition Height="1*" /> |
| 32 | + <RowDefinition Height="1*" /> |
| 33 | + <RowDefinition Height="1*" /> |
| 34 | + </Grid.RowDefinitions> |
| 35 | + |
| 36 | + <TextBlock |
| 37 | + Grid.Column="0" |
| 38 | + Grid.Row="0" |
| 39 | + Text="Server URL" |
| 40 | + HorizontalAlignment="Right" |
| 41 | + Padding="10"/> |
| 42 | + |
| 43 | + <TextBlock |
| 44 | + Grid.Column="1" |
| 45 | + Grid.Row="0" |
| 46 | + HorizontalAlignment="Stretch" |
| 47 | + VerticalAlignment="Center" |
| 48 | + Padding="10" |
| 49 | + Text="{x:Bind Path=ViewModel.Url, Mode=OneTime}" |
| 50 | + /> |
| 51 | + |
| 52 | + <TextBlock |
| 53 | + Grid.Column="0" |
| 54 | + Grid.Row="1" |
| 55 | + Text="Session Token" |
| 56 | + HorizontalAlignment="Right" |
| 57 | + Padding="10"/> |
| 58 | + |
| 59 | + <TextBox |
| 60 | + Grid.Column="1" |
| 61 | + Grid.Row="1" |
| 62 | + HorizontalAlignment="Stretch" |
| 63 | + PlaceholderText="paste your token here" |
| 64 | + Text="{x:Bind Path=ViewModel.CoderToken, Mode=TwoWay}" |
| 65 | + /> |
| 66 | + |
| 67 | + <HyperlinkButton |
| 68 | + Grid.Column="1" |
| 69 | + Grid.Row="2" |
| 70 | + Content="Generate a token via the Web UI" |
| 71 | + NavigateUri="{x:Bind ViewModel.GenTokenURL, Mode=OneTime}" /> |
| 72 | + |
| 73 | + </Grid> |
| 74 | + |
| 75 | + <StackPanel |
| 76 | + Orientation="Horizontal" |
| 77 | + HorizontalAlignment="Center" |
| 78 | + Spacing="10"> |
| 79 | + <Button Content="Back" HorizontalAlignment="Right" |
| 80 | + Click="{x:Bind SignInWindow.NavigateToURLPage}"/> |
| 81 | + <Button Content="Sign In" HorizontalAlignment="Left" Style="{StaticResource AccentButtonStyle}" |
| 82 | + Click="{x:Bind ViewModel.SignIn_Click}"/> |
| 83 | + </StackPanel> |
| 84 | + |
| 85 | + <TextBlock |
| 86 | + Text="{x:Bind ViewModel.LoginError, Mode=OneWay}" |
| 87 | + HorizontalAlignment="Center" |
| 88 | + Foreground="Red" |
| 89 | + /> |
| 90 | + |
| 91 | + |
| 92 | + </StackPanel> |
| 93 | +</Page> |
0 commit comments