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
|
### 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
|
* Default to a "Wabbajack" user agent when making HTTP calls
|
||||||
* Some niceties for Mod authors uploading to our CDN
|
* Some niceties for Mod authors uploading to our CDN
|
||||||
* upgrade several external dependencies
|
* upgrade several external dependencies
|
||||||
|
@ -144,7 +144,7 @@ namespace Wabbajack
|
|||||||
.Select<string, Func<ModListMetadataVM, bool>>(search => (vm) =>
|
.Select<string, Func<ModListMetadataVM, bool>>(search => (vm) =>
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(search)) return true;
|
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)
|
.Filter(this.WhenAny(x => x.ShowNSFW)
|
||||||
.Select<bool, Func<ModListMetadataVM, bool>>(showNSFW => vm =>
|
.Select<bool, Func<ModListMetadataVM, bool>>(showNSFW => vm =>
|
||||||
|
@ -11,6 +11,7 @@ using System.Windows;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using Alphaleonis.Win32.Filesystem;
|
using Alphaleonis.Win32.Filesystem;
|
||||||
|
using DynamicData;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using ReactiveUI.Fody.Helpers;
|
using ReactiveUI.Fody.Helpers;
|
||||||
using Wabbajack.Common;
|
using Wabbajack.Common;
|
||||||
@ -77,10 +78,13 @@ namespace Wabbajack
|
|||||||
Metadata = metadata;
|
Metadata = metadata;
|
||||||
Location = LauncherUpdater.CommonFolder.Value.Combine("downloaded_mod_lists", Metadata.Links.MachineURL + (string)Consts.ModListExtension);
|
Location = LauncherUpdater.CommonFolder.Value.Combine("downloaded_mod_lists", Metadata.Links.MachineURL + (string)Consts.ModListExtension);
|
||||||
ModListTagList = new List<ModListTag>();
|
ModListTagList = new List<ModListTag>();
|
||||||
|
|
||||||
Metadata.tags.ForEach(tag =>
|
Metadata.tags.ForEach(tag =>
|
||||||
{
|
{
|
||||||
ModListTagList.Add(new ModListTag(tag));
|
ModListTagList.Add(new ModListTag(tag));
|
||||||
});
|
});
|
||||||
|
ModListTagList.Add(new ModListTag(metadata.Game.MetaData().HumanFriendlyGameName));
|
||||||
|
|
||||||
DownloadSizeText = "Download size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfArchives);
|
DownloadSizeText = "Download size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfArchives);
|
||||||
InstallSizeText = "Installation size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfInstalledFiles);
|
InstallSizeText = "Installation size : " + UIUtils.FormatBytes(Metadata.DownloadMetadata.SizeOfInstalledFiles);
|
||||||
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
|
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
|
||||||
|
@ -69,11 +69,12 @@
|
|||||||
</Border.Style>
|
</Border.Style>
|
||||||
<Grid
|
<Grid
|
||||||
Width="570"
|
Width="570"
|
||||||
Height="440"
|
Height="480"
|
||||||
Background="{StaticResource DarkBackgroundBrush}">
|
Background="{StaticResource DarkBackgroundBrush}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="40" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
@ -143,28 +144,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Ellipse.Style>
|
</Ellipse.Style>
|
||||||
</Ellipse>
|
</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
|
<Label
|
||||||
Margin="10,257,0,0"
|
Margin="10,257,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
@ -275,12 +254,37 @@
|
|||||||
Foreground="{StaticResource SecondaryBrush}"
|
Foreground="{StaticResource SecondaryBrush}"
|
||||||
Maximum="1"
|
Maximum="1"
|
||||||
Visibility="{Binding IsEnabled, ElementName=ExecuteButton, Converter={StaticResource bool2VisibilityHiddenConverter}, ConverterParameter=False}" />
|
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">
|
||||||
x:Name="MetadataDescription"
|
<TextBlock
|
||||||
Margin="8,5"
|
x:Name="MetadataDescription"
|
||||||
VerticalAlignment="Center"
|
Margin="8,5"
|
||||||
FontSize="14"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap" />
|
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 Grid.Row="1" Grid.Column="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
Loading…
Reference in New Issue
Block a user