mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add unofficial lists to the UI
This commit is contained in:
parent
fd2b523493
commit
26eb1ed38b
@ -107,7 +107,7 @@ namespace Wabbajack
|
||||
|
||||
private bool _useCompression = false;
|
||||
public bool UseCompression { get => _useCompression; set => RaiseAndSetIfChanged(ref _useCompression, value); }
|
||||
public bool ShowUtilityLists { get; set; }
|
||||
public bool ShowUnofficial { get; set; }
|
||||
}
|
||||
|
||||
[JsonName("PerformanceSettings")]
|
||||
|
@ -40,7 +40,7 @@ namespace Wabbajack
|
||||
public bool ShowNSFW { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool ShowUtilityLists { get; set; }
|
||||
public bool ShowUnofficial { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string GameType { get; set; }
|
||||
@ -65,7 +65,7 @@ namespace Wabbajack
|
||||
{
|
||||
GameType = !string.IsNullOrEmpty(settings.Game) ? settings.Game : ALL_GAME_TYPE;
|
||||
ShowNSFW = settings.ShowNSFW;
|
||||
ShowUtilityLists = settings.ShowUtilityLists;
|
||||
ShowUnofficial = settings.ShowUnofficial;
|
||||
OnlyInstalled = settings.OnlyInstalled;
|
||||
Search = settings.Search;
|
||||
}
|
||||
@ -82,7 +82,7 @@ namespace Wabbajack
|
||||
{
|
||||
OnlyInstalled = false;
|
||||
ShowNSFW = false;
|
||||
ShowUtilityLists = false;
|
||||
ShowUnofficial = false;
|
||||
Search = string.Empty;
|
||||
GameType = ALL_GAME_TYPE;
|
||||
});
|
||||
@ -153,8 +153,8 @@ namespace Wabbajack
|
||||
if (!vm.Metadata.NSFW) return true;
|
||||
return vm.Metadata.NSFW && showNSFW;
|
||||
}))
|
||||
.Filter(this.WhenAny(x => x.ShowUtilityLists)
|
||||
.Select<bool, Func<ModListMetadataVM, bool>>(showUtilityLists => vm => showUtilityLists ? vm.Metadata.UtilityList : !vm.Metadata.UtilityList))
|
||||
.Filter(this.WhenAny(x => x.ShowUnofficial)
|
||||
.Select<bool, Func<ModListMetadataVM, bool>>(ShowUnofficial => vm => vm.Metadata.RepositoryName == "wj-featured" || ShowUnofficial))
|
||||
// Filter by Game
|
||||
.Filter(this.WhenAny(x => x.GameType)
|
||||
.Debounce(TimeSpan.FromMilliseconds(150), RxApp.MainThreadScheduler)
|
||||
@ -202,7 +202,7 @@ namespace Wabbajack
|
||||
settings.Game = GameType;
|
||||
settings.Search = Search;
|
||||
settings.ShowNSFW = ShowNSFW;
|
||||
settings.ShowUtilityLists = ShowUtilityLists;
|
||||
settings.ShowUnofficial = ShowUnofficial;
|
||||
settings.OnlyInstalled = OnlyInstalled;
|
||||
}
|
||||
}
|
||||
|
@ -117,11 +117,12 @@
|
||||
Content="Show NSFW"
|
||||
Foreground="{StaticResource ForegroundBrush}" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
x:Name="ShowUtilityLists"
|
||||
x:Name="ShowUnofficial"
|
||||
Margin="10,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
Content="Only Utility Lists"
|
||||
Content="Show Unofficial Lists"
|
||||
Foreground="{StaticResource ForegroundBrush}" />
|
||||
|
||||
<CheckBox
|
||||
|
@ -63,7 +63,7 @@ namespace Wabbajack
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(ViewModel, vm => vm.ShowNSFW, x => x.ShowNSFW.IsChecked)
|
||||
.DisposeWith(dispose);
|
||||
this.BindStrict(ViewModel, vm => vm.ShowUtilityLists, x => x.ShowUtilityLists.IsChecked)
|
||||
this.BindStrict(ViewModel, vm => vm.ShowUnofficial, x => x.ShowUnofficial.IsChecked)
|
||||
.DisposeWith(dispose);
|
||||
|
||||
this.WhenAny(x => x.ViewModel.ClearFiltersCommand)
|
||||
|
Loading…
Reference in New Issue
Block a user