Skip to content

Commit 7667f6a

Browse files
authored
Fix several UI bugs in 2.1 pre-release (#1238)
Fix a few bugs that were spotted during testing of the 2.1 pre-release: - Missing Atlassian logo resource from the compiled binaries - Remote URL is shown even for Bitbucket cloud with in-proc GUI - In-proc basic auth GUI user name field should only be set if non-null or whitespace Also bump the VERSION to 2.1.1 in the expectation for this to replace 2.1.0.
2 parents f58b3de + 2664652 commit 7667f6a

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0.0
1+
2.1.1.0

src/shared/Atlassian.Bitbucket/Atlassian.Bitbucket.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@
1717
<Reference Include="System.Net.Http" />
1818
</ItemGroup>
1919

20+
<ItemGroup>
21+
<AvaloniaResource Include="UI\Assets\atlassian-logo.png" />
22+
</ItemGroup>
23+
2024
</Project>

src/shared/Atlassian.Bitbucket/BitbucketAuthentication.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,20 @@ private async Task<CredentialsPromptResult> GetCredentialsViaUiAsync(
110110
{
111111
var viewModel = new CredentialsViewModel(Context.Environment)
112112
{
113-
Url = targetUri,
114-
UserName = userName,
115113
ShowOAuth = (modes & AuthenticationModes.OAuth) != 0,
116114
ShowBasic = (modes & AuthenticationModes.Basic) != 0
117115
};
118116

117+
if (!BitbucketHelper.IsBitbucketOrg(targetUri))
118+
{
119+
viewModel.Url = targetUri;
120+
}
121+
122+
if (!string.IsNullOrWhiteSpace(userName))
123+
{
124+
viewModel.UserName = userName;
125+
}
126+
119127
await AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentWindowHandle(), CancellationToken.None);
120128

121129
ThrowIfWindowCancelled(viewModel);

src/shared/Core/Authentication/BasicAuthentication.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private async Task<ICredential> GetCredentialsViaUiAsync(string resource, string
6060
Description = !string.IsNullOrWhiteSpace(resource)
6161
? $"Enter your credentials for '{resource}'"
6262
: "Enter your credentials",
63-
UserName = userName,
63+
UserName = string.IsNullOrWhiteSpace(userName) ? null : userName,
6464
};
6565

6666
await AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentWindowHandle(), CancellationToken.None);

0 commit comments

Comments
 (0)