Browse Source

default to recommended torch version & show disclaimers

pull/438/head
JT 11 months ago
parent
commit
82004934aa
  1. 2
      StabilityMatrix.Avalonia/ViewModels/PackageInstallDetailViewModel.cs
  2. 43
      StabilityMatrix.Avalonia/Views/Dialogs/NewInstallerDialog.axaml

2
StabilityMatrix.Avalonia/ViewModels/PackageInstallDetailViewModel.cs

@ -107,6 +107,8 @@ public partial class PackageInstallDetailViewModel(
UpdateVersions();
await UpdateCommits(SelectedPackage.MainBranch);
}
SelectedTorchVersion = SelectedPackage.GetRecommendedTorchVersion();
}
[RelayCommand]

43
StabilityMatrix.Avalonia/Views/Dialogs/NewInstallerDialog.axaml

@ -30,43 +30,40 @@
CommandParameter="{Binding }">
<controls:Card>
<Grid RowDefinitions="Auto, Auto, Auto, Auto"
ColumnDefinitions="Auto, *, Auto">
<Grid ColumnDefinitions="Auto, *, Auto">
<controls:BetterAdvancedImage
Grid.Row="0"
Grid.RowSpan="4"
Grid.Column="0"
MaxHeight="128"
MaxWidth="128"
Stretch="UniformToFill"
CornerRadius="4"
Source="{Binding PreviewImageUri}" />
<TextBlock Grid.Row="0"
Grid.Column="1"
Text="{Binding DisplayName}"
<StackPanel Grid.Column="1" Orientation="Vertical">
<TextBlock Text="{Binding DisplayName}"
FontWeight="Light"
Margin="16,0,0,0"
FontSize="20" />
<TextBlock Grid.Row="1"
Grid.Column="1"
Text="{Binding ByAuthor}"
<TextBlock Text="{Binding ByAuthor}"
FontWeight="Light"
Margin="16,-4,0,0"
Margin="16,0,0,0"
FontSize="13" />
<TextBlock Grid.Row="0"
Grid.RowSpan="4"
Grid.Column="1"
TextWrapping="Wrap"
<TextBlock TextWrapping="Wrap"
Text="{Binding Blurb}"
FontWeight="Light"
Margin="16,0,0,0"
VerticalAlignment="Center"
Margin="16,8,0,8"
FontSize="16" />
<TextBlock TextWrapping="Wrap"
Text="{Binding Disclaimer}"
IsVisible="{Binding Disclaimer, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Foreground="OrangeRed"
FontWeight="Light"
Margin="16,-4,0,4"
FontSize="14" />
<ItemsRepeater Grid.Column="1"
Grid.Row="3"
Margin="16, 8, 0, 8"
<ItemsRepeater Margin="16, 8, 0, 0"
ItemsSource="{Binding AvailableTorchVersions}">
<ItemsRepeater.Layout>
<StackLayout Orientation="Horizontal" />
@ -187,10 +184,10 @@
</DataTemplate>
</ItemsRepeater.ItemTemplate>
</ItemsRepeater>
</StackPanel>
<controls1:SymbolIcon Grid.Row="0"
Grid.RowSpan="4"
Grid.Column="2"
<controls1:SymbolIcon Grid.Column="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
FontSize="24"

Loading…
Cancel
Save