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

Commit

Permalink
Merge branch 'github-enterprise' into releases/v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Oct 24, 2018
2 parents d8fe6f7 + 0f623d5 commit 66b8bf6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/GitHub.Api/Application/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void LoginWithToken(string token, Action<bool> result)
Guard.ArgumentNotNull(result, "result");

new FuncTask<bool>(taskManager.Token,
() => loginManager.LoginWithToken(HostAddress.WebUri.Host, token))
() => loginManager.LoginWithToken(UriString.ToUriString(HostAddress.WebUri), token))
.FinallyInUI((success, ex, res) =>
{
if (!success)
Expand All @@ -279,7 +279,7 @@ public void LoginWithToken(string token, Action<bool> result)

public void CreateOAuthToken(string code, Action<bool, string> result)
{
var command = "token -h " + HostAddress.ApiUri.Host;
var command = "token -h " + HostAddress.WebUri.Host;
var octorunTask = new OctorunTask(taskManager.Token, environment, command, code)
.Configure(processManager);

Expand Down Expand Up @@ -388,7 +388,7 @@ private Connection Connection
{
if (connection == null)
{
connection = keychain.Connections.FirstOrDefault(x => x.Host == (UriString)HostAddress.WebUri.Host);
connection = keychain.Connections.FirstOrDefault(x => x.Host.ToUriString().Host == HostAddress.WebUri.Host);
}

return connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void OnGUILogin()
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle))
if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle))
{
GUI.FocusControl(null);
Application.OpenURL(oAuthOpenUrl);
Expand Down Expand Up @@ -216,7 +216,7 @@ private void OnOAuthCallback(string state, string code)
if (state.Equals(oAuthState))
{
isBusy = true;
authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult);
authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s)));
}
}

Expand Down Expand Up @@ -292,7 +292,7 @@ private AuthenticationService AuthenticationService
{
if (authenticationService == null)
{
AuthenticationService = new AuthenticationService(HostAddress.GitHubDotComHostAddress.WebUri.Host, Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
AuthenticationService = new AuthenticationService(UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri), Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
}
return authenticationService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public override void OnGUI()
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle))
if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle))
{
GUI.FocusControl(null);
Application.OpenURL(oAuthOpenUrl);
Expand Down Expand Up @@ -334,7 +334,7 @@ private void OnOAuthCallback(string state, string code)
if (state.Equals(oAuthState))
{
isBusy = true;
authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult);
authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s)));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void MaybeUpdateData()
{
connectionsNeedLoading = false;
connections = Platform.Keychain.Connections.OrderByDescending(HostAddress.IsGitHubDotCom).ToArray();
connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host).ToArray();
connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host.ToUriString().Host).ToArray();

var connection = connections.First();
selectedConnection = 0;
Expand Down

0 comments on commit 66b8bf6

Please sign in to comment.