Skip to content

Commit

Permalink
Installation history tab
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Apr 30, 2023
1 parent 86e034e commit 6f88760
Show file tree
Hide file tree
Showing 9 changed files with 713 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Core/GameInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ public string DownloadCacheDir()
public string InstallHistoryDir()
=> CKANPathUtils.NormalizePath(Path.Combine(CkanDir(), "history"));

public IOrderedEnumerable<FileInfo> InstallHistoryFiles()
=> Directory.EnumerateFiles(InstallHistoryDir(), "*.ckan")
.Select(f => new FileInfo(f))
.OrderByDescending(fi => fi.CreationTime);

public GameVersion Version()
{
Expand Down
1 change: 1 addition & 0 deletions Core/HelpURLs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static class HelpURLs
public const string PlayTime = "https://github.com/KSP-CKAN/CKAN/pull/3543";
public const string DownloadsFailed = "https://github.com/KSP-CKAN/CKAN/pull/3635";
public const string UnmanagedFiles = "https://github.com/KSP-CKAN/CKAN/pull/3833";
public const string InstallationHistory = "https://github.com/KSP-CKAN/CKAN/pull/3834";

public const string Discord = "https://discord.gg/Mb4nXQD";
}
Expand Down
12 changes: 12 additions & 0 deletions GUI/CKAN-GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@
<Compile Include="Controls\UnmanagedFiles.Designer.cs">
<DependentUpon>UnmanagedFiles.cs</DependentUpon>
</Compile>
<Compile Include="Controls\InstallationHistory.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\InstallationHistory.Designer.cs">
<DependentUpon>InstallationHistory.cs</DependentUpon>
</Compile>
<Compile Include="Controls\EditModSearches.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down Expand Up @@ -340,6 +346,9 @@
<Compile Include="Main\MainUnmanaged.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main\MainHistory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main\MainWait.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -880,6 +889,9 @@
<EmbeddedResource Include="Controls\UnmanagedFiles.resx">
<DependentUpon>UnmanagedFiles.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\InstallationHistory.resx">
<DependentUpon>InstallationHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\PlayTime.resx">
<DependentUpon>PlayTime.cs</DependentUpon>
</EmbeddedResource>
Expand Down
238 changes: 238 additions & 0 deletions GUI/Controls/InstallationHistory.Designer.cs

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

Loading

0 comments on commit 6f88760

Please sign in to comment.