Skip to content

Commit 1d5a694

Browse files
authored
Merge pull request #336 from mjcheetham/xui2
Add cross-platform UI based on Avalonia
2 parents 6aef9b1 + 1af5378 commit 1d5a694

File tree

64 files changed

+3066
-88
lines changed

Some content is hidden

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

64 files changed

+3066
-88
lines changed

Git-Credential-Manager.sln

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Packaging.Linux", "src\linu
7373
EndProject
7474
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{8F9D7E67-7DD7-4E32-9134-423281AF00E9}"
7575
EndProject
76+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI", "src\shared\GitHub.UI\GitHub.UI.csproj", "{B5F00B46-FE93-45F2-B283-52B74B3E13B9}"
77+
EndProject
78+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atlassian.Bitbucket.UI", "src\shared\Atlassian.Bitbucket.UI\Atlassian.Bitbucket.UI.csproj", "{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}"
79+
EndProject
80+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Git.CredentialManager.UI", "src\shared\Microsoft.Git.CredentialManager.UI\Microsoft.Git.CredentialManager.UI.csproj", "{001846B0-462B-4A27-90CD-2435D4C0F680}"
81+
EndProject
7682
Global
7783
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7884
Debug|Any CPU = Debug|Any CPU
@@ -315,6 +321,54 @@ Global
315321
{AD2A935F-3720-4802-8119-6A9B35B254DF}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
316322
{AD2A935F-3720-4802-8119-6A9B35B254DF}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
317323
{AD2A935F-3720-4802-8119-6A9B35B254DF}.LinuxRelease|Any CPU.Build.0 = Release|Any CPU
324+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
325+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
326+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
327+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
328+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
329+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.MacRelease|Any CPU.Build.0 = Release|Any CPU
330+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
331+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.Release|Any CPU.Build.0 = Release|Any CPU
332+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
333+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
334+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
335+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
336+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
337+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
338+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.LinuxRelease|Any CPU.ActiveCfg = Release|Any CPU
339+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9}.LinuxRelease|Any CPU.Build.0 = Release|Any CPU
340+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
341+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
342+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
343+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
344+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
345+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.MacRelease|Any CPU.Build.0 = Release|Any CPU
346+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
347+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.Release|Any CPU.Build.0 = Release|Any CPU
348+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
349+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
350+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
351+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
352+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
353+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
354+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.LinuxRelease|Any CPU.ActiveCfg = Release|Any CPU
355+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA}.LinuxRelease|Any CPU.Build.0 = Release|Any CPU
356+
{001846B0-462B-4A27-90CD-2435D4C0F680}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
357+
{001846B0-462B-4A27-90CD-2435D4C0F680}.Debug|Any CPU.Build.0 = Debug|Any CPU
358+
{001846B0-462B-4A27-90CD-2435D4C0F680}.MacDebug|Any CPU.ActiveCfg = Debug|Any CPU
359+
{001846B0-462B-4A27-90CD-2435D4C0F680}.MacDebug|Any CPU.Build.0 = Debug|Any CPU
360+
{001846B0-462B-4A27-90CD-2435D4C0F680}.MacRelease|Any CPU.ActiveCfg = Release|Any CPU
361+
{001846B0-462B-4A27-90CD-2435D4C0F680}.MacRelease|Any CPU.Build.0 = Release|Any CPU
362+
{001846B0-462B-4A27-90CD-2435D4C0F680}.Release|Any CPU.ActiveCfg = Release|Any CPU
363+
{001846B0-462B-4A27-90CD-2435D4C0F680}.Release|Any CPU.Build.0 = Release|Any CPU
364+
{001846B0-462B-4A27-90CD-2435D4C0F680}.WindowsDebug|Any CPU.ActiveCfg = Debug|Any CPU
365+
{001846B0-462B-4A27-90CD-2435D4C0F680}.WindowsDebug|Any CPU.Build.0 = Debug|Any CPU
366+
{001846B0-462B-4A27-90CD-2435D4C0F680}.WindowsRelease|Any CPU.ActiveCfg = Release|Any CPU
367+
{001846B0-462B-4A27-90CD-2435D4C0F680}.WindowsRelease|Any CPU.Build.0 = Release|Any CPU
368+
{001846B0-462B-4A27-90CD-2435D4C0F680}.LinuxDebug|Any CPU.ActiveCfg = Debug|Any CPU
369+
{001846B0-462B-4A27-90CD-2435D4C0F680}.LinuxDebug|Any CPU.Build.0 = Debug|Any CPU
370+
{001846B0-462B-4A27-90CD-2435D4C0F680}.LinuxRelease|Any CPU.ActiveCfg = Release|Any CPU
371+
{001846B0-462B-4A27-90CD-2435D4C0F680}.LinuxRelease|Any CPU.Build.0 = Release|Any CPU
318372
EndGlobalSection
319373
GlobalSection(SolutionProperties) = preSolution
320374
HideSolutionNode = FALSE
@@ -341,6 +395,9 @@ Global
341395
{D34D31DF-B44A-45D3-9B39-73573077BAE0} = {66722747-1B61-40E4-A89B-1AC8E6D62EA9}
342396
{8F9D7E67-7DD7-4E32-9134-423281AF00E9} = {A7FC1234-95E3-4496-B5F7-4306F41E6A0E}
343397
{AD2A935F-3720-4802-8119-6A9B35B254DF} = {8F9D7E67-7DD7-4E32-9134-423281AF00E9}
398+
{B5F00B46-FE93-45F2-B283-52B74B3E13B9} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
399+
{EB1AA840-6FFF-4464-A9B2-0AEA36F615EA} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
400+
{001846B0-462B-4A27-90CD-2435D4C0F680} = {D5277A0E-997E-453A-8CB9-4EFCC8B16A29}
344401
EndGlobalSection
345402
GlobalSection(ExtensibilityGlobals) = postSolution
346403
SolutionGuid = {0EF9FC65-E6BA-45D4-A455-262A9EA4366B}

assets/gcm.xaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Stretch="Uniform">
3+
<Canvas Name="svg815" Width="256" Height="256">
4+
<Canvas.RenderTransform>
5+
<TranslateTransform X="0" Y="0"/>
6+
</Canvas.RenderTransform>
7+
<Canvas.Resources/>
8+
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="path8" Fill="#FFF05033" StrokeThickness="2.24708056">
9+
<Path.Data>
10+
<PathGeometry Figures="m 127.74219 0 c -4.21881 0 -8.43843 1.6093415 -11.65821 4.828125 L 92.875 28.041016 122.31445 57.482422 c 6.84425 -2.310946 14.68947 -0.761046 20.14258 4.693359 5.48141 5.488392 7.0192 13.400136 4.65039 20.267578 l 28.37696 28.376951 c 6.86492 -2.36579 14.78398 -0.83727 20.26562 4.6543 7.66374 7.66179 7.66374 20.07642 0 27.74023 -7.66486 7.66631 -20.07893 7.66631 -27.74805 0 -5.76254 -5.76724 -7.18821 -14.23373 -4.26953 -21.33398 l -26.46289 -26.464844 -0.002 69.640624 c 1.8684 0.92496 3.63248 2.16064 5.18945 3.71094 7.66148 7.6609 7.66148 20.07236 0 27.74609 -7.66374 7.66066 -20.08459 7.66066 -27.74023 0 -7.66262 -7.67305 -7.66262 -20.08452 0 -27.74609 1.89369 -1.89039 4.08382 -3.32218 6.42187 -4.28125 V 94.199219 c -2.33912 -0.955028 -4.52734 -2.375687 -6.42383 -4.28125 -5.80409 -5.799832 -7.20125 -14.319608 -4.22461 -21.447266 L 81.466797 39.443359 4.8300781 116.08203 c -6.4393305 6.44252 -6.4393305 16.88229 0 23.32031 L 42.5 177.07227 V 162.70508 C 35.078345 157.16403 29.678851 149.02425 27.328125 140.07617 19.76286 115.647 40.902921 87.908596 66.359375 88.345703 76.747705 88.003924 87.132367 91.94485 94.875 98.837891 c 18.78493 15.372969 17.87151 47.496839 -0.888672 62.484379 l -2.566406 1.3457 0.222656 12.46503 -8.160156 8.24395 v 34.67578 l 33.119138 33.11915 c 6.43505 6.43757 16.87041 6.43757 23.31446 0 L 251.17188 139.92969 c 6.43732 -6.4407 6.43732 -16.88336 0 -23.32227 l 0.002 -0.01 L 139.39453 4.828125 C 136.1788 1.6093415 131.96099 0 127.74219 0 Z" FillRule="NonZero"/>
11+
</Path.Data>
12+
</Path>
13+
<Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="path831" Fill="#FF4D4D4D" StrokeThickness="4.12109041">
14+
<Path.Data>
15+
<PathGeometry Figures="M 67.333984 94.333984 A 35.333332 35.333332 0 0 0 32 129.66602 A 35.333332 35.333332 0 0 0 48.5 159.54688 L 48.5 234.5 L 54.5 240 L 67 240 L 79 228 L 79 216.5 L 73 210 L 79 203.5 L 73 197 L 79 191 L 73 185.5 L 85.5 173 L 85.5 159.92188 A 35.333332 35.333332 0 0 0 102.66602 129.66602 A 35.333332 35.333332 0 0 0 67.333984 94.333984 z M 66.777344 109 A 9 9 0 0 1 75.777344 118 A 9 9 0 0 1 66.777344 127 A 9 9 0 0 1 57.777344 118 A 9 9 0 0 1 66.777344 109 z M 54.5 168 L 60.5 173 L 60.5 234.5 L 54.5 228 L 54.5 168 z " FillRule="NonZero"/>
16+
</Path.Data>
17+
</Path>
18+
</Canvas>
19+
</Viewbox>

src/linux/Packaging.Linux/build.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +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"
4749
PROJ_OUT="$OUT/linux/Packaging.Linux"
4850

4951
# Build parameters
@@ -94,8 +96,26 @@ dotnet publish "$GCM_SRC" \
9496
--configuration="$CONFIGURATION" \
9597
--framework="$FRAMEWORK" \
9698
--runtime="$RUNTIME" \
97-
--self-contained=true \
98-
"/p:PublishSingleFile=True" \
99+
--self-contained=true \
100+
-p:PublishSingleFile=true \
101+
--output="$(make_absolute "$PAYLOAD")" || exit 1
102+
103+
echo "Publishing Bitbucket UI helper..."
104+
dotnet publish "$BITBUCKET_UI_SRC" \
105+
--configuration="$CONFIGURATION" \
106+
--framework="$FRAMEWORK" \
107+
--runtime="$RUNTIME" \
108+
--self-contained=true \
109+
-p:PublishSingleFile=true \
110+
--output="$(make_absolute "$PAYLOAD")" || exit 1
111+
112+
echo "Publishing GitHub UI helper..."
113+
dotnet publish "$GITHUB_UI_SRC" \
114+
--configuration="$CONFIGURATION" \
115+
--framework="$FRAMEWORK" \
116+
--runtime="$RUNTIME" \
117+
--self-contained=true \
118+
-p:PublishSingleFile=true \
99119
--output="$(make_absolute "$PAYLOAD")" || exit 1
100120

101121
# Collect symbols

src/osx/Installer.Mac/Installer.Mac.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
<ItemGroup>
1515
<ProjectReference Include="../../shared/Git-Credential-Manager/Git-Credential-Manager.csproj" ReferenceOutputAssembly="false" />
16+
<ProjectReference Include="../../shared/Atlassian.Bitbucket.UI/Atlassian.Bitbucket.UI.csproj" ReferenceOutputAssembly="false" />
17+
<ProjectReference Include="../../shared/GitHub.UI/GitHub.UI.csproj" ReferenceOutputAssembly="false" />
1618
</ItemGroup>
1719

1820
<!-- Implicit SDK targets import (so we can override the default targets below) -->

src/osx/Installer.Mac/layout.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +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"
2426

2527
# Build parameters
2628
FRAMEWORK=net5.0
@@ -77,6 +79,20 @@ dotnet publish "$GCM_SRC" \
7779
--runtime="$RUNTIME" \
7880
--output="$(make_absolute "$PAYLOAD")" || exit 1
7981

82+
echo "Publishing Bitbucket UI helper..."
83+
dotnet publish "$BITBUCKET_UI_SRC" \
84+
--configuration="$CONFIGURATION" \
85+
--framework="$FRAMEWORK" \
86+
--runtime="$RUNTIME" \
87+
--output="$(make_absolute "$PAYLOAD")" || exit 1
88+
89+
echo "Publishing GitHub UI helper..."
90+
dotnet publish "$GITHUB_UI_SRC" \
91+
--configuration="$CONFIGURATION" \
92+
--framework="$FRAMEWORK" \
93+
--runtime="$RUNTIME" \
94+
--output="$(make_absolute "$PAYLOAD")" || exit 1
95+
8096
# Collect symbols
8197
echo "Collecting managed symbols..."
8298
mv "$PAYLOAD"/*.pdb "$SYMBOLOUT" || exit 1

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,20 @@
2020

2121
<ItemGroup>
2222
<FilesToSign Include="
23+
$(OutDir)\Atlassian.Bitbucket.dll;
24+
$(OutDir)\Atlassian.Bitbucket.UI.dll;
2325
$(OutDir)\git-credential-manager-core.dll;
2426
$(OutDir)\GitHub.dll;
27+
$(OutDir)\GitHub.UI.dll;
2528
$(OutDir)\Microsoft.AzureRepos.dll;
2629
$(OutDir)\Microsoft.Git.CredentialManager.dll;">
2730
<Authenticode>Microsoft400</Authenticode>
2831
<InProject>false</InProject>
2932
</FilesToSign>
3033
<MacFilesToSign Include="
31-
$(OutDir)\git-credential-manager-core;">
34+
$(OutDir)\git-credential-manager-core;
35+
$(OutDir)\GitHub.UI;
36+
$(OutDir)\Atlassian.Bitbucket.UI;">
3237
<InProject>false</InProject>
3338
</MacFilesToSign>
3439
</ItemGroup>
13.1 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\Atlassian.Bitbucket\Atlassian.Bitbucket.csproj" />
11+
<ProjectReference Include="..\Microsoft.Git.CredentialManager.UI\Microsoft.Git.CredentialManager.UI.csproj" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<Compile Update="Controls\TesterWindow.axaml.cs">
16+
<DependentUpon>TesterWindow.axaml</DependentUpon>
17+
<SubType>Code</SubType>
18+
</Compile>
19+
<AvaloniaResource Include="Assets\**" />
20+
</ItemGroup>
21+
22+
</Project>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.CommandLine;
4+
using System.CommandLine.Invocation;
5+
using System.Threading;
6+
using System.Threading.Tasks;
7+
using Atlassian.Bitbucket.UI.ViewModels;
8+
using Atlassian.Bitbucket.UI.Views;
9+
using Microsoft.Git.CredentialManager;
10+
using Microsoft.Git.CredentialManager.UI;
11+
12+
namespace Atlassian.Bitbucket.UI.Commands
13+
{
14+
internal class CredentialsCommand : HelperCommand
15+
{
16+
public CredentialsCommand(CommandContext context)
17+
: base(context, "userpass", "Show authentication prompt.")
18+
{
19+
AddOption(
20+
new Option<string>("--username", "Username or email.")
21+
);
22+
23+
Handler = CommandHandler.Create<string>(ExecuteAsync);
24+
}
25+
26+
private async Task<int> ExecuteAsync(string userName)
27+
{
28+
var viewModel = new CredentialsViewModel(Context.Environment)
29+
{
30+
UserName = userName
31+
};
32+
33+
await AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentHandle(), CancellationToken.None);
34+
35+
if (!viewModel.WindowResult)
36+
{
37+
throw new Exception("User cancelled dialog.");
38+
}
39+
40+
WriteResult(new Dictionary<string, string>
41+
{
42+
["username"] = viewModel.UserName,
43+
["password"] = viewModel.Password,
44+
});
45+
46+
return 0;
47+
}
48+
}
49+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.CommandLine;
4+
using System.CommandLine.Invocation;
5+
using System.Threading;
6+
using System.Threading.Tasks;
7+
using Atlassian.Bitbucket.UI.ViewModels;
8+
using Atlassian.Bitbucket.UI.Views;
9+
using Microsoft.Git.CredentialManager;
10+
using Microsoft.Git.CredentialManager.UI;
11+
12+
namespace Atlassian.Bitbucket.UI.Commands
13+
{
14+
internal class OAuthCommand : HelperCommand
15+
{
16+
public OAuthCommand(CommandContext context)
17+
: base(context, "oauth", "Show OAuth required prompt.")
18+
{
19+
Handler = CommandHandler.Create(ExecuteAsync);
20+
}
21+
22+
private async Task<int> ExecuteAsync()
23+
{
24+
var viewModel = new OAuthViewModel(Context.Environment);
25+
await AvaloniaUi.ShowViewAsync<OAuthView>(viewModel, GetParentHandle(), CancellationToken.None);
26+
27+
if (!viewModel.WindowResult)
28+
{
29+
throw new Exception("User cancelled dialog.");
30+
}
31+
32+
WriteResult(new Dictionary<string, string>
33+
{
34+
["continue"] = "true"
35+
});
36+
37+
return 0;
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)