Modlist website button added to installer view

This commit is contained in:
Justin Swanson 2019-10-31 21:57:49 -05:00
parent b0d83a6210
commit 313890e526
3 changed files with 16 additions and 8 deletions

View File

@ -93,6 +93,7 @@ namespace Wabbajack
public IReactiveCommand BeginCommand { get; }
public IReactiveCommand ShowReportCommand { get; }
public IReactiveCommand OpenReadmeCommand { get; }
public IReactiveCommand VisitWebsiteCommand { get; }
public InstallerVM(MainWindowVM mainWindowVM)
{
@ -250,6 +251,11 @@ namespace Wabbajack
canExecute: this.WhenAny(x => x.Installing)
.Select(installing => !installing)
.ObserveOnGuiThread());
this.VisitWebsiteCommand = ReactiveCommand.Create(
execute: () => Process.Start(this.ModList.Website),
canExecute: this.WhenAny(x => x.ModList.Website)
.Select(x => x?.StartsWith("https://") ?? false)
.ObserveOnGuiThread());
// Have Installation location updates modify the downloads location if empty
this.WhenAny(x => x.Location)

View File

@ -83,11 +83,6 @@ namespace Wabbajack
.ObserveOnGuiThread()
.Do(modList =>
{
this.NexusSiteURL = modList.Website;
this.ModName = modList.Name;
this.AuthorName = modList.Author;
this.Summary = modList.Description;
this.SlideShowElements = modList.Archives
.Select(m => m.State)
.OfType<NexusDownloader.State>()

View File

@ -408,15 +408,22 @@
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0"
Margin="30, 10"
Margin="30, 5"
Content="Readme"
ToolTip="Open the readme webpage for the modlist"
ToolTip="Open the readme for the modlist"
FontSize="20"
Command="{Binding OpenReadmeCommand}" />
<Button Grid.Row="1"
Margin="30, 10"
Margin="30, 5"
Content="Website"
ToolTip="Open the webpage for the modlist"
FontSize="20"
Command="{Binding VisitWebsiteCommand}" />
<Button Grid.Row="2"
Margin="30, 5"
Content="Manifest"
ToolTip="Open an explicit listing of all actions this modlist will take"
FontSize="20"