mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using System;
|
|
|
|
namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|
{
|
|
/// <summary>
|
|
/// Class representing a Dalamud changelog.
|
|
/// </summary>
|
|
internal class DalamudChangelogEntry : IChangelogEntry
|
|
{
|
|
private readonly DalamudChangelog changelog;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="DalamudChangelogEntry"/> class.
|
|
/// </summary>
|
|
/// <param name="changelog">The changelog.</param>
|
|
public DalamudChangelogEntry(DalamudChangelog changelog)
|
|
{
|
|
this.changelog = changelog;
|
|
|
|
var changelogText = string.Empty;
|
|
for (var i = 0; i < changelog.Changes.Count; i++)
|
|
{
|
|
var change = changelog.Changes[i];
|
|
changelogText += $"{change.Message} (by {change.Author})";
|
|
|
|
if (i < changelog.Changes.Count - 1)
|
|
{
|
|
changelogText += Environment.NewLine;
|
|
}
|
|
}
|
|
|
|
this.Text = changelogText;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string Title => "Dalamud Core";
|
|
|
|
/// <inheritdoc/>
|
|
public string Version => this.changelog.Version;
|
|
|
|
/// <inheritdoc/>
|
|
public string Text { get; init; }
|
|
|
|
/// <inheritdoc/>
|
|
public DateTime Date => this.changelog.Date;
|
|
}
|
|
}
|