Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit a90431f

Browse files
Progress
1 parent 70b0c41 commit a90431f

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubAuthenticationView.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ private AuthenticationService AuthenticationService
243243
{
244244
if (authenticationService == null)
245245
{
246-
UriString host = Repository != null ? Repository.CloneUrl : null;
247-
AuthenticationService = new AuthenticationService(host, Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
246+
AuthenticationService = new AuthenticationService(HostAddress.GitHubDotComHostAddress.WebUri.Host, Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
248247
}
249248
return authenticationService;
250249
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubEnterpriseAuthenticationView.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ private void OnGUIUserPasswordLogin()
203203
GUILayout.BeginHorizontal();
204204
{
205205
GUILayout.FlexibleSpace();
206+
if (GUILayout.Button("Back"))
207+
{
208+
GUI.FocusControl(null);
209+
210+
hasServerMeta = false;
211+
Redraw();
212+
}
213+
206214
if (GUILayout.Button(LoginButton) || (!isBusy && enterPressed))
207215
{
208216
GUI.FocusControl(null);

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@ private void MaybeUpdateData()
217217
{
218218
if (HasRepository && !string.IsNullOrEmpty(Repository.CloneUrl))
219219
{
220-
UriString host = new UriString(Repository.CloneUrl.ToRepositoryUri()
221-
.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
220+
var host = Repository.CloneUrl
221+
.ToRepositoryUri()
222+
.GetComponents(UriComponents.Host, UriFormat.SafeUnescaped);
222223

223-
connections = Platform.Keychain.Connections.OrderByDescending(x => x.Host.ToUriString() == host).ToArray();
224+
connections = Platform.Keychain.Connections.OrderByDescending(x => x.Host == host).ToArray();
224225
}
225226
else
226227
{

0 commit comments

Comments
 (0)