GeezerVison is showing github.com — Merge branch 'github-enterprise' into releases/v1.2.0 · github-for-unity/Unity@66b8bf6
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File treeExpand file treeCollapse file tree Open diff view settings UnityExtension/Assets/Editor/GitHub.Unity/UI
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/GitHub.Api/Application/ApiClient.cs +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -262,7 +262,7 @@ public void LoginWithToken(string token, Action<bool> result) | 262 | 262 | Guard.ArgumentNotNull(result, "result"); | 263 | 263 |
| 264 | 264 | new FuncTask<bool>(taskManager.Token, | 265 | | - () => loginManager.LoginWithToken(HostAddress.WebUri.Host, token)) | | 265 | + () => loginManager.LoginWithToken(UriString.ToUriString(HostAddress.WebUri), token)) | 266 | 266 | .FinallyInUI((success, ex, res) => | 267 | 267 | { | 268 | 268 | if (!success) | @@ -279,7 +279,7 @@ public void LoginWithToken(string token, Action<bool> result) | 279 | 279 |
| 280 | 280 | public void CreateOAuthToken(string code, Action<bool, string> result) | 281 | 281 | { | 282 | | - var command = "token -h " + HostAddress.ApiUri.Host; | | 282 | + var command = "token -h " + HostAddress.WebUri.Host; | 283 | 283 | var octorunTask = new OctorunTask(taskManager.Token, environment, command, code) | 284 | 284 | .Configure(processManager); | 285 | 285 |
| @@ -388,7 +388,7 @@ private Connection Connection | 388 | 388 | { | 389 | 389 | if (connection == null) | 390 | 390 | { | 391 | | - connection = keychain.Connections.FirstOrDefault(x => x.Host == (UriString)HostAddress.WebUri.Host); | | 391 | + connection = keychain.Connections.FirstOrDefault(x => x.Host.ToUriString().Host == HostAddress.WebUri.Host); | 392 | 392 | } | 393 | 393 |
| 394 | 394 | return connection; | |
Collapse file Copy file name to clipboardExpand all lines: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubAuthenticationView.cs +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -160,7 +160,7 @@ private void OnGUILogin() | 160 | 160 | GUILayout.BeginHorizontal(); | 161 | 161 | { | 162 | 162 | GUILayout.FlexibleSpace(); | 163 | | - if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle)) | | 163 | + if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle)) | 164 | 164 | { | 165 | 165 | GUI.FocusControl(null); | 166 | 166 | Application.OpenURL(oAuthOpenUrl); | @@ -216,7 +216,7 @@ private void OnOAuthCallback(string state, string code) | 216 | 216 | if (state.Equals(oAuthState)) | 217 | 217 | { | 218 | 218 | isBusy = true; | 219 | | - authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult); | | 219 | + authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s))); | 220 | 220 | } | 221 | 221 | } | 222 | 222 |
| @@ -292,7 +292,7 @@ private AuthenticationService AuthenticationService | 292 | 292 | { | 293 | 293 | if (authenticationService == null) | 294 | 294 | { | 295 | | - AuthenticationService = new AuthenticationService(HostAddress.GitHubDotComHostAddress.WebUri.Host, Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment); | | 295 | + AuthenticationService = new AuthenticationService(UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri), Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment); | 296 | 296 | } | 297 | 297 | return authenticationService; | 298 | 298 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubEnterpriseAuthenticationView.cs +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -126,7 +126,7 @@ public override void OnGUI() | 126 | 126 | GUILayout.BeginHorizontal(); | 127 | 127 | { | 128 | 128 | GUILayout.FlexibleSpace(); | 129 | | - if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle)) | | 129 | + if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle)) | 130 | 130 | { | 131 | 131 | GUI.FocusControl(null); | 132 | 132 | Application.OpenURL(oAuthOpenUrl); | @@ -334,7 +334,7 @@ private void OnOAuthCallback(string state, string code) | 334 | 334 | if (state.Equals(oAuthState)) | 335 | 335 | { | 336 | 336 | isBusy = true; | 337 | | - authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult); | | 337 | + authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s))); | 338 | 338 | } | 339 | 339 | }); | 340 | 340 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PublishView.cs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -59,7 +59,7 @@ private void MaybeUpdateData() | 59 | 59 | { | 60 | 60 | connectionsNeedLoading = false; | 61 | 61 | connections = Platform.Keychain.Connections.OrderByDescending(HostAddress.IsGitHubDotCom).ToArray(); | 62 | | - connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host).ToArray(); | | 62 | + connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host.ToUriString().Host).ToArray(); | 63 | 63 |
| 64 | 64 | var connection = connections.First(); | 65 | 65 | selectedConnection = 0; | |
|