make changes a list, add template json for installer info

This commit is contained in:
IsWaffle 2024-05-01 12:36:32 -04:00
parent 9fc0ab8554
commit e84e000180
5 changed files with 21 additions and 5 deletions

View File

@ -7,6 +7,7 @@
<entry key="SPTInstaller/Assets/Styles.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/CacheInfo.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/DetailedPreCheckItem.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/Dialogs/ChangeLogDialog.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/Dialogs/ConfirmationDialog.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/Dialogs/MessageDialog.axaml" value="SPTInstaller/SPTInstaller.csproj" />
<entry key="SPTInstaller/CustomControls/Dialogs/WhyCacheThoughDialog.axaml" value="SPTInstaller/SPTInstaller.csproj" />

View File

@ -5,7 +5,7 @@
xmlns:dialogHost="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SPTInstaller.CustomControls.Dialogs.ChangeLogDialog"
MinWidth="400">
MinWidth="400" MaxWidth="600">
<StackPanel>
<Label Content="{Binding Version, RelativeSource={RelativeSource AncestorType=UserControl}, StringFormat='{}Installer Change Log for {0}'}" FontSize="18" FontWeight="SemiBold"
/>

View File

@ -1,7 +1,9 @@
namespace SPTInstaller.Models;
using System.Collections.Generic;
namespace SPTInstaller.Models;
public class InstallerInfo
{
public string LatestVersion { get; set; }
public string ChangeLog { get; set; }
public List<string> Changes { get; set; }
}

View File

@ -167,9 +167,13 @@ public class InstallerUpdateInfo : ReactiveObject
}
NewVersion = latestVersion;
ChangeLog = installerInfo.ChangeLog;
EndCheck($"Update available: v{latestVersion}", true);
foreach (var change in installerInfo.Changes)
{
ChangeLog += $"◉ {change}\n";
}
EndCheck($"Update Installer: v{latestVersion}", true);
return;
}

View File

@ -0,0 +1,9 @@
{
// You will want to remove comments before using this template
"latestVersion": "0.0", // the new version you are pushing
"changes": [ // a list of chnages. These will be formated for you. Don't add leading bullets or such
"changes",
"go",
"here"
]
}