Skip to content

Commit 613d894

Browse files
authored
Merge pull request #472 from mjcheetham/combined-ui
Combine WPF and Avalonia UI view models and commands
2 parents dfc8ac6 + a7838c8 commit 613d894

File tree

148 files changed

+1580
-7180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+1580
-7180
lines changed

Git-Credential-Manager.sln

Lines changed: 91 additions & 34 deletions
Large diffs are not rendered by default.

src/linux/Packaging.Linux/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ ROOT="$( cd "$THISDIR"/../../.. ; pwd -P )"
4444
SRC="$ROOT/src"
4545
OUT="$ROOT/out"
4646
GCM_SRC="$SRC/shared/Git-Credential-Manager"
47-
BITBUCKET_UI_SRC="$SRC/shared/Atlassian.Bitbucket.UI"
48-
GITHUB_UI_SRC="$SRC/shared/GitHub.UI"
47+
BITBUCKET_UI_SRC="$SRC/shared/Atlassian.Bitbucket.UI.Avalonia"
48+
GITHUB_UI_SRC="$SRC/shared/GitHub.UI.Avalonia"
4949
PROJ_OUT="$OUT/linux/Packaging.Linux"
5050

5151
# Build parameters

src/osx/Installer.Mac/layout.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ SRC="$ROOT/src"
2121
OUT="$ROOT/out"
2222
INSTALLER_SRC="$SRC/osx/Installer.Mac"
2323
GCM_SRC="$SRC/shared/Git-Credential-Manager"
24-
BITBUCKET_UI_SRC="$SRC/shared/Atlassian.Bitbucket.UI"
25-
GITHUB_UI_SRC="$SRC/shared/GitHub.UI"
24+
BITBUCKET_UI_SRC="$SRC/shared/Atlassian.Bitbucket.UI.Avalonia"
25+
GITHUB_UI_SRC="$SRC/shared/GitHub.UI.Avalonia"
2626

2727
# Build parameters
2828
FRAMEWORK=net5.0

src/osx/SignFiles.Mac/SignFiles.Mac.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
<FilesToSign Include="
2323
$(OutDir)\Atlassian.Bitbucket.dll;
2424
$(OutDir)\Atlassian.Bitbucket.UI.dll;
25+
$(OutDir)\Atlassian.Bitbucket.UI.Shared.dll;
2526
$(OutDir)\git-credential-manager-core.dll;
2627
$(OutDir)\GitHub.dll;
2728
$(OutDir)\GitHub.UI.dll;
29+
$(OutDir)\GitHub.UI.Shared.dll;
2830
$(OutDir)\Microsoft.AzureRepos.dll;
2931
$(OutDir)\Microsoft.Git.CredentialManager.dll;">
3032
<Authenticode>Microsoft400</Authenticode>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net5.0</TargetFramework>
6+
<RuntimeIdentifiers>osx-x64;linux-x64</RuntimeIdentifiers>
7+
<RootNamespace>Atlassian.Bitbucket.UI</RootNamespace>
8+
<AssemblyName>Atlassian.Bitbucket.UI</AssemblyName>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<ProjectReference Include="..\Atlassian.Bitbucket.UI\Atlassian.Bitbucket.UI.csproj" />
13+
<ProjectReference Include="..\Microsoft.Git.CredentialManager.UI.Avalonia\Microsoft.Git.CredentialManager.UI.Avalonia.csproj" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<Compile Update="Controls\TesterWindow.axaml.cs">
18+
<DependentUpon>TesterWindow.axaml</DependentUpon>
19+
<SubType>Code</SubType>
20+
</Compile>
21+
<AvaloniaResource Include="Assets\**" />
22+
</ItemGroup>
23+
24+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Threading;
2+
using System.Threading.Tasks;
3+
using Atlassian.Bitbucket.UI.ViewModels;
4+
using Atlassian.Bitbucket.UI.Views;
5+
using Microsoft.Git.CredentialManager;
6+
using Microsoft.Git.CredentialManager.UI;
7+
8+
namespace Atlassian.Bitbucket.UI.Commands
9+
{
10+
public class CredentialsCommandImpl : CredentialsCommand
11+
{
12+
public CredentialsCommandImpl(ICommandContext context) : base(context) { }
13+
14+
protected override Task ShowAsync(CredentialsViewModel viewModel, CancellationToken ct)
15+
{
16+
return AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentHandle(), ct);
17+
}
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Threading;
2+
using System.Threading.Tasks;
3+
using Atlassian.Bitbucket.UI.ViewModels;
4+
using Atlassian.Bitbucket.UI.Views;
5+
using Microsoft.Git.CredentialManager;
6+
using Microsoft.Git.CredentialManager.UI;
7+
8+
namespace Atlassian.Bitbucket.UI.Commands
9+
{
10+
public class OAuthCommandImpl : OAuthCommand
11+
{
12+
public OAuthCommandImpl(CommandContext context) : base(context) { }
13+
14+
protected override Task ShowAsync(OAuthViewModel viewModel, CancellationToken ct)
15+
{
16+
return AvaloniaUi.ShowViewAsync<OAuthView>(viewModel, GetParentHandle(), ct);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)