From 658a2b66b17dcd52c5e651e87df2d4723e04dd87 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Fri, 25 Jan 2019 16:41:05 +0000 Subject: [PATCH 1/2] Show sign in with browser first --- .../Views/Dialog/LoginCredentialsView.xaml | 121 ++++++++++-------- .../Views/Dialog/LoginCredentialsView.xaml.cs | 1 + 2 files changed, 68 insertions(+), 54 deletions(-) diff --git a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml index 38ccf788d9..3dfb45a8c3 100644 --- a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml +++ b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml @@ -13,11 +13,11 @@ - - - - - + + + + + @@ -44,7 +44,7 @@ Style="{DynamicResource GitHubH1TextBlock}" IsHitTestVisible="False" Text="{x:Static ghfvs:Resources.LoginLink}" /> - + - + + + + + + + + + + + + + + + + + + - - - - - - - - or - - - - - - - - @@ -122,7 +123,7 @@ - + @@ -135,7 +136,7 @@ - + @@ -144,31 +145,60 @@ PromptText="{x:Static ghfvs:Resources.enterpriseUrlPromptText}" Margin="0,0,0,10" AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.EnterpriseServerAddressTextBox}"> - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + + + + + + + - - + + + + + + + + + + + @@ -177,23 +207,6 @@ - - - - - - - - - - - - - - - - - diff --git a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml.cs b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml.cs index 17b04d827c..f324fbf238 100644 --- a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml.cs +++ b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml.cs @@ -94,6 +94,7 @@ void SetupEnterpriseBindings(Action d) d(this.OneWayBind(ViewModel, vm => vm.EnterpriseLogin.SupportedLoginMethods, x => x.enterpriseUsernamePasswordPanel.Visibility, x => x.HasValue && ((x & EnterpriseLoginMethods.UsernameAndPassword) != 0) ? Visibility.Visible : Visibility.Collapsed)); d(this.OneWayBind(ViewModel, vm => vm.EnterpriseLogin.SupportedLoginMethods, x => x.enterpriseTokenPanel.Visibility, x => x.HasValue && ((x & EnterpriseLoginMethods.Token) != 0) ? Visibility.Visible : Visibility.Collapsed)); d(this.OneWayBind(ViewModel, vm => vm.EnterpriseLogin.SupportedLoginMethods, x => x.enterpriseSsoPanel.Visibility, x => x.HasValue && ((x & EnterpriseLoginMethods.OAuth) != 0) ? Visibility.Visible : Visibility.Collapsed)); + d(this.OneWayBind(ViewModel, vm => vm.EnterpriseLogin.SupportedLoginMethods, x => x.enterpriseLogInButton.Visibility, x => x.HasValue && ((x & (EnterpriseLoginMethods.UsernameAndPassword | EnterpriseLoginMethods.Token)) != 0) ? Visibility.Visible : Visibility.Collapsed)); d(this.Bind(ViewModel, vm => vm.EnterpriseLogin.UsernameOrEmail, x => x.enterpriseUserNameOrEmail.Text)); d(this.OneWayBind(ViewModel, vm => vm.EnterpriseLogin.UsernameOrEmailValidator, v => v.enterpriseUserNameOrEmailValidationMessage.ReactiveValidator)); From a8aad02ef71da28c05e2d29400ffff7685559986 Mon Sep 17 00:00:00 2001 From: Jamie Cansdale Date: Sat, 7 Mar 2020 22:21:09 +0000 Subject: [PATCH 2/2] Hide the usename/password for github.com Signing with with username/password is going away, see: https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/ --- .../Views/Dialog/LoginCredentialsView.xaml | 59 +++++++++++-------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml index 7885ce4d92..a2929bd299 100644 --- a/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml +++ b/src/GitHub.VisualStudio.UI/Views/Dialog/LoginCredentialsView.xaml @@ -90,32 +90,39 @@ - - - - - - - - - - - - - - - - -