mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Filter the gallery by tags
This commit is contained in:
parent
cb40768760
commit
7e29706b38
@ -1,6 +1,9 @@
|
||||
### Changelog
|
||||
|
||||
#### Version - 2.4.3.3 - 4/12/2021
|
||||
#### Version - 2.4.4.0 - ???
|
||||
* Search by tags in the gallery view
|
||||
|
||||
#### Version - 2.4.3.3 - 4/13/2021
|
||||
* Default to a "Wabbajack" user agent when making HTTP calls
|
||||
* Some niceties for Mod authors uploading to our CDN
|
||||
* upgrade several external dependencies
|
||||
|
@ -144,7 +144,7 @@ namespace Wabbajack
|
||||
.Select<string, Func<ModListMetadataVM, bool>>(search => (vm) =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(search)) return true;
|
||||
return vm.Metadata.Title.ContainsCaseInsensitive(search);
|
||||
return vm.Metadata.Title.ContainsCaseInsensitive(search) || vm.Metadata.tags.Any(t => t.ContainsCaseInsensitive(search));
|
||||
}))
|
||||
.Filter(this.WhenAny(x => x.ShowNSFW)
|
||||
.Select<bool, Func<ModListMetadataVM, bool>>(showNSFW => vm =>
|
||||
|
@ -11,6 +11,7 @@ using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Alphaleonis.Win32.Filesystem;
|
||||
using DynamicData;
|
||||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
using Wabbajack.Common;
|
||||
@ -77,10 +78,13 @@ namespace Wabbajack
|
||||
Metadata = metadata;
|
||||
Location = LauncherUpdater.CommonFolder.Value.Combine("downloaded_mod_lists", Metadata.Links.MachineURL + (string)Consts.ModListExtension);
|
||||
ModListTagList = new List<ModListTag>();
|
||||
|
||||
Metadata.tags.ForEach(tag =>
|
||||
{
|
||||
ModListTagList.Add(new ModListTag(tag));
|
||||
});
|
||||
ModListTagList.Add(new ModListTag(metadata.Game.MetaData().HumanFriendlyGameName));
|
||||
|
||||
DownloadSizeText = "Download size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfArchives);
|
||||
InstallSizeText = "Installation size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfInstalledFiles);
|
||||
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
|
||||
|
@ -69,11 +69,12 @@
|
||||
</Border.Style>
|
||||
<Grid
|
||||
Width="570"
|
||||
Height="440"
|
||||
Height="480"
|
||||
Background="{StaticResource DarkBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="40" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
@ -143,28 +144,6 @@
|
||||
</Style>
|
||||
</Ellipse.Style>
|
||||
</Ellipse>
|
||||
<ItemsControl ItemsSource="{Binding ModListTagList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Margin="10,5,0,5"
|
||||
Background="{StaticResource Analogous1Brush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="7,7,7,7"
|
||||
Opacity="0.90">
|
||||
<TextBlock
|
||||
Margin="5,5,5,5"
|
||||
FontSize="15"
|
||||
Text="{Binding Name}" />
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Label
|
||||
Margin="10,257,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
@ -275,12 +254,37 @@
|
||||
Foreground="{StaticResource SecondaryBrush}"
|
||||
Maximum="1"
|
||||
Visibility="{Binding IsEnabled, ElementName=ExecuteButton, Converter={StaticResource bool2VisibilityHiddenConverter}, ConverterParameter=False}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0"
|
||||
<ScrollViewer Grid.Row="1" Grid.Column="0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock
|
||||
x:Name="MetadataDescription"
|
||||
Margin="8,5"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
<ItemsControl Grid.Row="2" Grid.ColumnSpan="2" ItemsSource="{Binding ModListTagList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Margin="5,5,0,5"
|
||||
Background="{StaticResource Analogous1Brush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="7,7,7,7"
|
||||
VerticalAlignment="Center"
|
||||
Opacity="0.90">
|
||||
<TextBlock
|
||||
Margin="5,5,5,5"
|
||||
FontSize="15"
|
||||
Text="{Binding Name}" />
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
|
Loading…
Reference in New Issue
Block a user