|
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
5 | 5 | xmlns:vm="clr-namespace:Atlassian.Bitbucket.UI.ViewModels;assembly=Atlassian.Bitbucket.UI.Shared"
|
| 6 | + xmlns:converters="clr-namespace:GitCredentialManager.UI.Converters;assembly=gcmcoreuiavn" |
6 | 7 | mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
7 | 8 | x:Class="Atlassian.Bitbucket.UI.Views.CredentialsView">
|
8 | 9 | <Design.DataContext>
|
9 | 10 | <vm:CredentialsViewModel/>
|
10 | 11 | </Design.DataContext>
|
11 | 12 | <DockPanel LastChildFill="True">
|
12 | 13 | <StackPanel DockPanel.Dock="Bottom">
|
13 |
| - <Button HorizontalAlignment="Center" Margin="0,30,0,10" |
| 14 | + <Button HorizontalAlignment="Center" Margin="0,0,0,10" |
14 | 15 | Classes="hyperlink"
|
15 | 16 | Command="{Binding ForgotPasswordCommand}"
|
16 | 17 | Content="Can't log in?"/>
|
17 |
| - <Button HorizontalAlignment="Center" Margin="0,0,0,10" |
| 18 | + <Button HorizontalAlignment="Center" Margin="0,0,0,8" |
18 | 19 | Classes="hyperlink"
|
19 | 20 | Command="{Binding SignUpCommand}"
|
20 | 21 | Content="Sign up for an account" />
|
21 | 22 | </StackPanel>
|
22 | 23 |
|
23 |
| - <StackPanel DockPanel.Dock="Top" Margin="0,0,0,30"> |
24 |
| - <Image HorizontalAlignment="Center" Source="/Assets/atlassian-logo.png" /> |
25 |
| - <TextBlock HorizontalAlignment="Center" Text="Log in to your account"/> |
| 24 | + <StackPanel DockPanel.Dock="Top"> |
| 25 | + <Image HorizontalAlignment="Center" Source="/Assets/atlassian-logo.png" Height="90" /> |
| 26 | + <TextBlock HorizontalAlignment="Center" Text="Log in to your account" Margin="0,-10,0,0" /> |
26 | 27 | <TextBlock HorizontalAlignment="Center" Text="{Binding Url}"
|
27 | 28 | IsVisible="{Binding Url, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
28 | 29 | Margin="0,10,0,0"/>
|
29 | 30 | </StackPanel>
|
30 | 31 |
|
31 |
| - <StackPanel Width="288"> |
32 |
| - <TextBox x:Name="userNameTextBox" Margin="0,0,0,10" |
33 |
| - HorizontalAlignment="Stretch" |
34 |
| - Watermark="Email or username" |
35 |
| - Text="{Binding UserName}" /> |
36 |
| - <TextBox x:Name="passwordTextBox" Margin="0,0,0,20" |
37 |
| - HorizontalAlignment="Stretch" |
38 |
| - Watermark="Password" PasswordChar="●" |
39 |
| - Text="{Binding Password}" /> |
40 |
| - <Button IsDefault="True" Margin="0,0,0,10" |
41 |
| - HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
42 |
| - Command="{Binding LoginCommand}" |
43 |
| - Content="Continue" Width="140" Height="40" |
44 |
| - Classes="accent" /> |
45 |
| - <Button HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
46 |
| - IsVisible="{Binding ShowOAuth}" |
47 |
| - Command="{Binding OAuthCommand}" |
48 |
| - Classes="hyperlink" |
49 |
| - Content="Sign in with OAuth" /> |
50 |
| - </StackPanel> |
| 32 | + <TabControl x:Name="authModesTabControl" |
| 33 | + VerticalContentAlignment="Center" |
| 34 | + AutoScrollToSelectedItem="True" |
| 35 | + Width="288" |
| 36 | + Margin="0,20"> |
| 37 | + <TabControl.Styles> |
| 38 | + <Style Selector="TabItem"> |
| 39 | + <Setter Property="MinHeight" Value="30" /> |
| 40 | + </Style> |
| 41 | + <Style Selector="DockPanel > ItemsPresenter > WrapPanel"> |
| 42 | + <Setter Property="HorizontalAlignment" Value="Center"/> |
| 43 | + </Style> |
| 44 | + </TabControl.Styles> |
| 45 | + |
| 46 | + <TabItem IsVisible="{Binding ShowOAuth}"> |
| 47 | + <TabItem.Header> |
| 48 | + <TextBlock Text="Browser" FontSize="12" /> |
| 49 | + </TabItem.Header> |
| 50 | + <StackPanel Margin="0,15"> |
| 51 | + <Button x:Name="oauthLoginButton" IsDefault="True" |
| 52 | + HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
| 53 | + Command="{Binding OAuthCommand}" |
| 54 | + Classes="accent" Height="40" Padding="15,5" |
| 55 | + Content="Sign in with your browser" /> |
| 56 | + </StackPanel> |
| 57 | + </TabItem> |
| 58 | + |
| 59 | + <TabItem IsVisible="{Binding ShowBasic}"> |
| 60 | + <TabItem.Header> |
| 61 | + <TextBlock Text="Password/Token" FontSize="12" /> |
| 62 | + </TabItem.Header> |
| 63 | + <StackPanel Margin="0,15"> |
| 64 | + <TextBox x:Name="userNameTextBox" Margin="0,0,0,10" |
| 65 | + HorizontalAlignment="Stretch" |
| 66 | + Watermark="Email or username" |
| 67 | + Text="{Binding UserName}" /> |
| 68 | + <TextBox x:Name="passwordTextBox" Margin="0,0,0,10" |
| 69 | + HorizontalAlignment="Stretch" |
| 70 | + Watermark="Password or token" PasswordChar="●" |
| 71 | + Text="{Binding Password}" /> |
| 72 | + <Button IsDefault="True" |
| 73 | + HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" |
| 74 | + Command="{Binding LoginCommand}" |
| 75 | + Content="Sign in" Width="140" Height="40" |
| 76 | + Classes="accent" /> |
| 77 | + </StackPanel> |
| 78 | + </TabItem> |
| 79 | + </TabControl> |
51 | 80 | </DockPanel>
|
52 | 81 | </UserControl>
|
0 commit comments