Adjust visibility of items in import ROM view.

This commit is contained in:
2025-07-24 21:13:45 +01:00
parent 55a6af0c74
commit 1435aa10ee
2 changed files with 7 additions and 2 deletions

View File

@@ -30,6 +30,8 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
readonly ConcurrentBag<DbMedia> _newMedias = [];
readonly Stopwatch _stopwatch = new();
[ObservableProperty]
bool _canChoose;
[ObservableProperty]
bool _canClose;
[ObservableProperty]
bool _canStart;
@@ -75,7 +77,6 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
[ObservableProperty]
bool _statusMessage2Visible;
public ImportRomFolderViewModel()
{
SelectFolderCommand = new AsyncRelayCommand(SelectFolderAsync);
@@ -86,6 +87,7 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
KnownOnlyChecked = true;
RecurseArchivesChecked = Settings.Settings.UnArUsable;
RemoveFilesEnabled = false;
CanChoose = true;
}
public ICommand SelectFolderCommand { get; }
@@ -122,6 +124,8 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
CanClose = false;
CanStart = false;
IsImporting = true;
IsReady = false;
CanChoose = false;
_ = Task.Run(() => _rootImporter.FindFiles(FolderPath));
}

View File

@@ -26,7 +26,8 @@
<Button Content="{x:Static resources:Localization.ChooseLabel}"
Command="{Binding SelectFolderCommand, Mode=OneWay}"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
VerticalAlignment="Center"
IsVisible="{Binding CanChoose}" />
<TextBlock Text="{x:Static resources:Localization.PathLabel}"
FontWeight="Bold"
VerticalAlignment="Center" />