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

feat: disabled 'new sync form' when creating a mutagen sync#110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletionsApp/ViewModels/FileSyncListViewModel.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,7 +48,11 @@ public partial class FileSyncListViewModel : ObservableObject
[NotifyPropertyChangedFor(nameof(ShowSessions))]
public partial string? Error { get; set; } = null;

[ObservableProperty] public partial bool OperationInProgress { get; set; } = false;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(CanOpenLocalPath))]
[NotifyPropertyChangedFor(nameof(NewSessionRemoteHostEnabled))]
[NotifyPropertyChangedFor(nameof(NewSessionRemotePathDialogEnabled))]
public partial bool OperationInProgress { get; set; } = false;

[ObservableProperty] public partial IReadOnlyList<SyncSessionViewModel> Sessions { get; set; } = [];

Expand All@@ -60,6 +64,7 @@ public partial class FileSyncListViewModel : ObservableObject

[ObservableProperty]
[NotifyPropertyChangedFor(nameof(NewSessionCreateEnabled))]
[NotifyPropertyChangedFor(nameof(CanOpenLocalPath))]
public partial bool NewSessionLocalPathDialogOpen { get; set; } = false;

[ObservableProperty]
Expand All@@ -80,10 +85,12 @@ public partial class FileSyncListViewModel : ObservableObject
[NotifyPropertyChangedFor(nameof(NewSessionRemotePathDialogEnabled))]
public partial bool NewSessionRemotePathDialogOpen { get; set; } = false;

public bool NewSessionRemoteHostEnabled => AvailableHosts.Count > 0;
public bool CanOpenLocalPath => !NewSessionLocalPathDialogOpen && !OperationInProgress;

public bool NewSessionRemoteHostEnabled => AvailableHosts.Count > 0 && !OperationInProgress;

public bool NewSessionRemotePathDialogEnabled =>
!string.IsNullOrWhiteSpace(NewSessionRemoteHost) && !NewSessionRemotePathDialogOpen;
!string.IsNullOrWhiteSpace(NewSessionRemoteHost) && !NewSessionRemotePathDialogOpen && !OperationInProgress;

[ObservableProperty] public partial string NewSessionStatus { get; set; } = "";

Expand Down
4 changes: 3 additions & 1 deletionApp/Views/Pages/FileSyncListMainPage.xaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -318,11 +318,12 @@
Grid.Column="0"
Margin="0,0,5,0"
VerticalAlignment="Stretch"
IsEnabled="{x:Bind ViewModel.OperationInProgress,Converter={StaticResource InverseBoolConverter}, Mode=OneWay}"
Text="{x:Bind ViewModel.NewSessionLocalPath, Mode=TwoWay}" />

<Button
Grid.Column="1"
IsEnabled="{x:Bind ViewModel.NewSessionLocalPathDialogOpen, Converter={StaticResource InverseBoolConverter}, Mode=OneWay}"
IsEnabled="{x:Bind ViewModel.CanOpenLocalPath, Mode=OneWay}"
Command="{x:Bind ViewModel.OpenLocalPathSelectDialogCommand}"
VerticalAlignment="Stretch">

Expand DownExpand Up@@ -350,6 +351,7 @@
Grid.Column="0"
Margin="0,0,5,0"
VerticalAlignment="Stretch"
IsEnabled="{x:Bind ViewModel.NewSessionRemotePathDialogEnabled, Mode=OneWay}"
Text="{x:Bind ViewModel.NewSessionRemotePath, Mode=TwoWay}" />

<Button
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp