Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions StabilityMatrix.Avalonia/Languages/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions StabilityMatrix.Avalonia/Languages/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@
<data name="Label_ModelDescription" xml:space="preserve">
<value>Model Description</value>
</data>
<data name="Label_ModelVersionDescription" xml:space="preserve">
<value>About this version</value>
</data>
<data name="Label_NewVersionAvailable" xml:space="preserve">
<value>A new version of Stability Matrix is available!</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace StabilityMatrix.Avalonia.ViewModels.Dialogs;
public partial class ModelVersionViewModel : ObservableObject
{
private readonly IModelIndexService modelIndexService;

public string VersionDescription { get; set; }

[ObservableProperty]
private CivitModelVersion modelVersion;
Expand Down Expand Up @@ -37,6 +39,9 @@ public ModelVersionViewModel(IModelIndexService modelIndexService, CivitModelVer
ModelVersion.Files?.Select(file => new CivitFileViewModel(modelIndexService, file))
?? new List<CivitFileViewModel>()
);

VersionDescription =
$"""<html><body class="markdown-body">{modelVersion.Description}</body></html>""";
}

public void RefreshInstallStatus()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
MinHeight="450"
Margin="8"
ColumnDefinitions="*,Auto,*"
RowDefinitions="Auto, Auto, *, Auto">
RowDefinitions="Auto, Auto, *, Auto, Auto">

<Grid.Resources>
<input:StandardUICommand x:Key="ImportCommand" Command="{Binding Import}" />
Expand Down Expand Up @@ -287,10 +287,22 @@
</ScrollViewer>
</Expander>

<StackPanel
<Expander
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="8,8"
ExpandDirection="Down"
Header="{x:Static lang:Resources.Label_ModelVersionDescription}">
<ScrollViewer MaxHeight="300">
<controls:MarkdownViewer Html="{Binding SelectedVersionViewModel.VersionDescription}" />
</ScrollViewer>
</Expander>

<StackPanel
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="0,8,0,0"
HorizontalAlignment="Center"
Orientation="Horizontal">
Expand Down