added json optional flag to only show version number over modlist image in installer view, if the modlist image already contains the title

removed debug code

change to pascal case and match existing code style

update changelog
This commit is contained in:
JanuarySnow 2023-07-30 00:43:33 +01:00
parent 77f6b8c9cb
commit 4d688b7ab9
4 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,8 @@
### Changelog
#### Version - TBA
* Added optional JSON flag for `DisplayVersionOnlyInInstallerView` to enable the installer image to only show version number.
#### Version - 3.2.0.1 - 7/23/2023
* Code cleanup: re-added some network and diagnostic code missing since 2.5

View File

@ -82,6 +82,13 @@ namespace Wabbajack
[Reactive]
public string VersionText { get; private set; }
[Reactive]
public bool ImageContainsTitle { get; private set; }
[Reactive]
public bool DisplayVersionOnlyInInstallerView { get; private set; }
[Reactive]
public IErrorResponse Error { get; private set; }
@ -123,6 +130,8 @@ namespace Wabbajack
Metadata.DownloadMetadata.SizeOfArchives + Metadata.DownloadMetadata.SizeOfInstalledFiles
);
VersionText = "Modlist version : " + Metadata.Version;
ImageContainsTitle = Metadata.ImageContainsTitle;
DisplayVersionOnlyInInstallerView = Metadata.DisplayVersionOnlyInInstallerView;
IsBroken = metadata.ValidationSummary.HasFailures || metadata.ForceDown;
// https://www.wabbajack.org/modlist/wj-featured/aldrnari
OpenWebsiteCommand = ReactiveCommand.Create(() => UIUtils.OpenWebsite(new Uri($"https://www.wabbajack.org/modlist/{Metadata.NamespacedName}")));

View File

@ -521,7 +521,14 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
private void PopulateSlideShow(ModList modList)
{
SlideShowTitle = modList.Name;
if (ModlistMetadata.ImageContainsTitle && ModlistMetadata.DisplayVersionOnlyInInstallerView)
{
SlideShowTitle = "v" + ModlistMetadata.Version.ToString();
}
else
{
SlideShowTitle = modList.Name;
}
SlideShowAuthor = modList.Author;
SlideShowDescription = modList.Description;
SlideShowImage = ModListImage;

View File

@ -30,6 +30,8 @@ public class ModlistMetadata
[JsonPropertyName("image_contains_title")]
public bool ImageContainsTitle { get; set; }
[JsonPropertyName("DisplayVersionOnlyInInstallerView")] public bool DisplayVersionOnlyInInstallerView { get; set; }
[JsonPropertyName("force_down")] public bool ForceDown { get; set; }
[JsonPropertyName("links")] public LinksObject Links { get; set; } = new();