diff --git a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs index ad459332..79acfa0a 100644 --- a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs @@ -33,28 +33,6 @@ public partial class DashboardViewModel : ViewModelBase private DiscordClient? _discord; - [ObservableProperty] - [NotifyPropertyChangedFor(nameof(IsProgressIndeterminate))] - [NotifyCanExecuteChangedFor(nameof(PullGuildsCommand))] - [NotifyCanExecuteChangedFor(nameof(PullChannelsCommand))] - [NotifyCanExecuteChangedFor(nameof(ExportCommand))] - public partial bool IsBusy { get; set; } - - [ObservableProperty] - [NotifyCanExecuteChangedFor(nameof(PullGuildsCommand))] - public partial string? Token { get; set; } - - [ObservableProperty] - public partial IReadOnlyList? AvailableGuilds { get; set; } - - [ObservableProperty] - [NotifyCanExecuteChangedFor(nameof(PullChannelsCommand))] - [NotifyCanExecuteChangedFor(nameof(ExportCommand))] - public partial Guild? SelectedGuild { get; set; } - - [ObservableProperty] - public partial IReadOnlyList? AvailableChannels { get; set; } - public DashboardViewModel( ViewModelManager viewModelManager, DialogManager dialogManager, @@ -84,10 +62,32 @@ public partial class DashboardViewModel : ViewModelBase ); } + [ObservableProperty] + [NotifyPropertyChangedFor(nameof(IsProgressIndeterminate))] + [NotifyCanExecuteChangedFor(nameof(PullGuildsCommand))] + [NotifyCanExecuteChangedFor(nameof(PullChannelsCommand))] + [NotifyCanExecuteChangedFor(nameof(ExportCommand))] + public partial bool IsBusy { get; set; } + public ProgressContainer Progress { get; } = new(); public bool IsProgressIndeterminate => IsBusy && Progress.Current.Fraction is <= 0 or >= 1; + [ObservableProperty] + [NotifyCanExecuteChangedFor(nameof(PullGuildsCommand))] + public partial string? Token { get; set; } + + [ObservableProperty] + public partial IReadOnlyList? AvailableGuilds { get; set; } + + [ObservableProperty] + [NotifyCanExecuteChangedFor(nameof(PullChannelsCommand))] + [NotifyCanExecuteChangedFor(nameof(ExportCommand))] + public partial Guild? SelectedGuild { get; set; } + + [ObservableProperty] + public partial IReadOnlyList? AvailableChannels { get; set; } + public ObservableCollection SelectedChannels { get; } = []; [RelayCommand]