Class ModDetailsViewModel
- Namespace
- McServerLauncher.ViewModels
- Assembly
- McServerLauncher.dll
The details page of one store item: everything Modrinth knows about a project, plus the two things Modrinth doesn't say — what it does in plain language, and whether it fits this server.
It paints in two passes. What the search result already carried (title, author, icon, summary) is shown at once, so opening a mod is instant; the long description, gallery, versions, dependencies and related items arrive as their requests come back. Nothing here decides whether a version is compatible or how a file is installed: both come from the existing services.
public class ModDetailsViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging, IDisposable
- Inheritance
-
ModDetailsViewModel
- Implements
- Inherited Members
Constructors
ModDetailsViewModel(ServerModsViewModel, ModrinthService, StoreItem)
public ModDetailsViewModel(ServerModsViewModel parent, ModrinthService modrinth, StoreItem seed)
Parameters
parentServerModsViewModelmodrinthModrinthServiceseedStoreItem
Properties
AuthorText
[ExcludeFromCodeCoverage]
public string AuthorText { get; set; }
Property Value
BackCommand
Gets an IRelayCommand instance wrapping McServerLauncher.ViewModels.ModDetailsViewModel.Back().
[ExcludeFromCodeCoverage]
public IRelayCommand BackCommand { get; }
Property Value
Body
[ExcludeFromCodeCoverage]
public string? Body { get; set; }
Property Value
BodyTruncated
True when the description was cut, so the page can point at Modrinth for the rest.
[ExcludeFromCodeCoverage]
public bool BodyTruncated { get; set; }
Property Value
CompatibilityBrush
public IBrush CompatibilityBrush { get; }
Property Value
- IBrush
CompatibilityDetail
[ExcludeFromCodeCoverage]
public string CompatibilityDetail { get; set; }
Property Value
CompatibilityKnown
[ExcludeFromCodeCoverage]
public bool CompatibilityKnown { get; set; }
Property Value
CompatibilityText
[ExcludeFromCodeCoverage]
public string CompatibilityText { get; set; }
Property Value
CurrentItem
What this page is showing, so the browser can push it onto its history.
public StoreItem CurrentItem { get; }
Property Value
Dependencies
public ObservableCollection<StoreLinkViewModel> Dependencies { get; }
Property Value
DownloadsText
[ExcludeFromCodeCoverage]
public string DownloadsText { get; set; }
Property Value
ErrorText
[ExcludeFromCodeCoverage]
public string? ErrorText { get; set; }
Property Value
FollowersText
[ExcludeFromCodeCoverage]
public string FollowersText { get; set; }
Property Value
Gallery
public ObservableCollection<GalleryImageViewModel> Gallery { get; }
Property Value
HasBody
public bool HasBody { get; }
Property Value
HasDependencies
public bool HasDependencies { get; }
Property Value
HasError
public bool HasError { get; }
Property Value
HasGallery
public bool HasGallery { get; }
Property Value
HasIcon
public bool HasIcon { get; }
Property Value
HasLicense
public bool HasLicense { get; }
Property Value
HasLinks
public bool HasLinks { get; }
Property Value
HasPublished
public bool HasPublished { get; }
Property Value
HasRelated
public bool HasRelated { get; }
Property Value
HasTags
public bool HasTags { get; }
Property Value
HasUpdated
public bool HasUpdated { get; }
Property Value
HasVersions
public bool HasVersions { get; }
Property Value
Icon
[ExcludeFromCodeCoverage]
public Bitmap? Icon { get; set; }
Property Value
- Bitmap
InstallCommand
Gets an IAsyncRelayCommand instance wrapping McServerLauncher.ViewModels.ModDetailsViewModel.Install().
[ExcludeFromCodeCoverage]
public IAsyncRelayCommand InstallCommand { get; }
Property Value
IsCompatible
[ExcludeFromCodeCoverage]
public bool IsCompatible { get; set; }
Property Value
IsInstalling
[ExcludeFromCodeCoverage]
public bool IsInstalling { get; set; }
Property Value
IsLoading
[ExcludeFromCodeCoverage]
public bool IsLoading { get; set; }
Property Value
LicenseText
[ExcludeFromCodeCoverage]
public string LicenseText { get; set; }
Property Value
Links
public ObservableCollection<ExternalLinkViewModel> Links { get; }
Property Value
ModrinthUrl
Modrinth's own page, offered as the escape hatch for anything not shown here.
public string ModrinthUrl { get; }
Property Value
NeedsClient
The warning that matters most on a server: everyone has to install this one.
[ExcludeFromCodeCoverage]
public bool NeedsClient { get; set; }
Property Value
OpenLinkCommand
Gets an IRelayCommand<T> instance wrapping OpenLink(string).
[ExcludeFromCodeCoverage]
public IRelayCommand<string?> OpenLinkCommand { get; }
Property Value
ProjectId
public string ProjectId { get; }
Property Value
PublishedText
[ExcludeFromCodeCoverage]
public string PublishedText { get; set; }
Property Value
Related
public ObservableCollection<StoreLinkViewModel> Related { get; }
Property Value
RelatedTitle
public string RelatedTitle { get; }
Property Value
SelectImageCommand
Gets an IRelayCommand<T> instance wrapping SelectImage(GalleryImageViewModel).
[ExcludeFromCodeCoverage]
public IRelayCommand<GalleryImageViewModel?> SelectImageCommand { get; }
Property Value
SelectedImage
[ExcludeFromCodeCoverage]
public GalleryImageViewModel? SelectedImage { get; set; }
Property Value
SideText
[ExcludeFromCodeCoverage]
public string SideText { get; set; }
Property Value
Summary
The plain-language summary: the curated catalogue, or the built one.
[ExcludeFromCodeCoverage]
public string Summary { get; set; }
Property Value
Tagline
The author's own one-line description, shown under the summary when they differ.
[ExcludeFromCodeCoverage]
public string Tagline { get; set; }
Property Value
Tags
public ObservableCollection<StoreTagViewModel> Tags { get; }
Property Value
Title
[ExcludeFromCodeCoverage]
public string Title { get; set; }
Property Value
UpdatedText
[ExcludeFromCodeCoverage]
public string UpdatedText { get; set; }
Property Value
Versions
public ObservableCollection<ModVersionViewModel> Versions { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
LoadAsync()
Loads the rest of the page. Every step is independent: a failure in one (say, the related strip) leaves the others intact, because a details page with less on it beats an error.
public Task LoadAsync()