Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite200dd4

Browse files
authored
feat: add remote directory picker to file sync (#73)
Adds a new remote directory picker window used when creating a file syncto select the remote directory.https://github.com/user-attachments/assets/3c661969-4ba8-46b0-8e3c-e97809c2ae1d## TODOs:- [x] Use a dropdown for picking workspace agent in the file sync UI,currently it's typed out (and will crash if empty lol)- [x] Fix reactivation of the window, try to make it function like anyother system dialog windowCloses#27
1 parentb803aa1 commite200dd4

30 files changed

+1078
-193
lines changed

‎App/App.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
<ItemGroup>
5858
<PackageReferenceInclude="CommunityToolkit.Mvvm"Version="8.4.0" />
59+
<PackageReferenceInclude="CommunityToolkit.WinUI.Controls.Primitives"Version="8.2.250402" />
5960
<PackageReferenceInclude="DependencyPropertyGenerator"Version="1.5.0">
6061
<PrivateAssets>all</PrivateAssets>
6162
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

‎App/App.xaml.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
usingSystem;
2+
usingSystem.Collections.Generic;
23
usingSystem.Diagnostics;
34
usingSystem.IO;
45
usingSystem.Threading;
56
usingSystem.Threading.Tasks;
7+
usingWindows.ApplicationModel.Activation;
68
usingCoder.Desktop.App.Models;
79
usingCoder.Desktop.App.Services;
810
usingCoder.Desktop.App.ViewModels;
911
usingCoder.Desktop.App.Views;
1012
usingCoder.Desktop.App.Views.Pages;
13+
usingCoder.Desktop.CoderSdk.Agent;
1114
usingCoder.Desktop.Vpn;
1215
usingMicrosoft.Extensions.Configuration;
1316
usingMicrosoft.Extensions.DependencyInjection;
1417
usingMicrosoft.Extensions.Hosting;
18+
usingMicrosoft.Extensions.Logging;
1519
usingMicrosoft.UI.Xaml;
1620
usingMicrosoft.Win32;
1721
usingMicrosoft.Windows.AppLifecycle;
18-
usingWindows.ApplicationModel.Activation;
19-
usingMicrosoft.Extensions.Logging;
2022
usingSerilog;
21-
usingSystem.Collections.Generic;
23+
usingLaunchActivatedEventArgs=Microsoft.UI.Xaml.LaunchActivatedEventArgs;
2224

2325
namespaceCoder.Desktop.App;
2426

@@ -60,6 +62,8 @@ public App()
6062
loggerConfig.ReadFrom.Configuration(builder.Configuration);
6163
});
6264

65+
services.AddSingleton<IAgentApiClientFactory,AgentApiClientFactory>();
66+
6367
services.AddSingleton<ICredentialManager,CredentialManager>();
6468
services.AddSingleton<IRpcController,RpcController>();
6569

@@ -76,6 +80,8 @@ public App()
7680
// FileSyncListMainPage is created by FileSyncListWindow.
7781
services.AddTransient<FileSyncListWindow>();
7882

83+
// DirectoryPickerWindow views and view models are created by FileSyncListViewModel.
84+
7985
// TrayWindow views and view models
8086
services.AddTransient<TrayWindowLoadingPage>();
8187
services.AddTransient<TrayWindowDisconnectedViewModel>();
@@ -89,7 +95,7 @@ public App()
8995
services.AddTransient<TrayWindow>();
9096

9197
_services=services.BuildServiceProvider();
92-
_logger=(ILogger<App>)(_services.GetService(typeof(ILogger<App>))!);
98+
_logger=(ILogger<App>)_services.GetService(typeof(ILogger<App>))!;
9399

94100
InitializeComponent();
95101
}
@@ -107,7 +113,7 @@ public async Task ExitApplication()
107113
Environment.Exit(0);
108114
}
109115

110-
protectedoverridevoidOnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgsargs)
116+
protectedoverridevoidOnLaunched(LaunchActivatedEventArgsargs)
111117
{
112118
_logger.LogInformation("new instance launched");
113119
// Start connecting to the manager in the background.

‎App/Converters/DependencyObjectSelector.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,7 @@ private static void SelectedKeyPropertyChanged(DependencyObject obj, DependencyP
186186
publicsealedclassStringToBrushSelectorItem:DependencyObjectSelectorItem<string,Brush>;
187187

188188
publicsealedclassStringToBrushSelector:DependencyObjectSelector<string,Brush>;
189+
190+
publicsealedclassStringToStringSelectorItem:DependencyObjectSelectorItem<string,string>;
191+
192+
publicsealedclassStringToStringSelector:DependencyObjectSelector<string,string>;

‎App/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private static void Main(string[] args)
2727
try
2828
{
2929
ComWrappersSupport.InitializeComWrappers();
30-
AppInstancemainInstance=GetMainInstance();
30+
varmainInstance=GetMainInstance();
3131
if(!mainInstance.IsCurrent)
3232
{
3333
varactivationArgs=AppInstance.GetCurrent().GetActivatedEventArgs();

‎App/Services/CredentialManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
usingSystem.Threading.Tasks;
88
usingCoder.Desktop.App.Models;
99
usingCoder.Desktop.CoderSdk;
10+
usingCoder.Desktop.CoderSdk.Coder;
1011
usingCoder.Desktop.Vpn.Utilities;
1112

1213
namespaceCoder.Desktop.App.Services;

‎App/Services/MutagenController.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
usingCoder.Desktop.MutagenSdk.Proto.Service.Prompting;
1313
usingCoder.Desktop.MutagenSdk.Proto.Service.Synchronization;
1414
usingCoder.Desktop.MutagenSdk.Proto.Synchronization;
15+
usingCoder.Desktop.MutagenSdk.Proto.Synchronization.Core.Ignore;
1516
usingCoder.Desktop.MutagenSdk.Proto.Url;
1617
usingCoder.Desktop.Vpn.Utilities;
1718
usingGrpc.Core;
@@ -85,7 +86,9 @@ public interface ISyncSessionController : IAsyncDisposable
8586
/// </summary>
8687
Task<SyncSessionControllerStateModel>RefreshState(CancellationTokenct=default);
8788

88-
Task<SyncSessionModel>CreateSyncSession(CreateSyncSessionRequestreq,Action<string>progressCallback,CancellationTokenct=default);
89+
Task<SyncSessionModel>CreateSyncSession(CreateSyncSessionRequestreq,Action<string>progressCallback,
90+
CancellationTokenct=default);
91+
8992
Task<SyncSessionModel>PauseSyncSession(stringidentifier,CancellationTokenct=default);
9093
Task<SyncSessionModel>ResumeSyncSession(stringidentifier,CancellationTokenct=default);
9194
TaskTerminateSyncSession(stringidentifier,CancellationTokenct=default);
@@ -200,7 +203,8 @@ public async Task<SyncSessionControllerStateModel> RefreshState(CancellationToke
200203
returnstate;
201204
}
202205

203-
publicasyncTask<SyncSessionModel>CreateSyncSession(CreateSyncSessionRequestreq,Action<string>?progressCallback=null,CancellationTokenct=default)
206+
publicasyncTask<SyncSessionModel>CreateSyncSession(CreateSyncSessionRequestreq,
207+
Action<string>?progressCallback=null,CancellationTokenct=default)
204208
{
205209
usingvar_=await_lock.LockAsync(ct);
206210
varclient=awaitEnsureDaemon(ct);
@@ -216,8 +220,11 @@ public async Task<SyncSessionModel> CreateSyncSession(CreateSyncSessionRequest r
216220
{
217221
Alpha=req.Alpha.MutagenUrl,
218222
Beta=req.Beta.MutagenUrl,
219-
// TODO: probably should set these at some point
220-
Configuration=newConfiguration(),
223+
// TODO: probably should add a configuration page for these at some point
224+
Configuration=newConfiguration
225+
{
226+
IgnoreVCSMode=IgnoreVCSMode.Ignore,
227+
},
221228
ConfigurationAlpha=newConfiguration(),
222229
ConfigurationBeta=newConfiguration(),
223230
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp