Add date formatting to admin-notes-unbanned (#40484)
This commit is contained in:
@@ -82,7 +82,11 @@ public sealed partial class AdminNotesLine : BoxContainer
|
|||||||
|
|
||||||
if (Note.UnbannedTime is not null)
|
if (Note.UnbannedTime is not null)
|
||||||
{
|
{
|
||||||
ExtraLabel.Text = Loc.GetString("admin-notes-unbanned", ("admin", Note.UnbannedByName ?? "[error]"), ("date", Note.UnbannedTime));
|
ExtraLabel.Text = Loc.GetString(
|
||||||
|
"admin-notes-unbanned",
|
||||||
|
("admin", Note.UnbannedByName ?? "[error]"),
|
||||||
|
("date", Note.UnbannedTime.Value.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"))
|
||||||
|
);
|
||||||
ExtraLabel.Visible = true;
|
ExtraLabel.Visible = true;
|
||||||
}
|
}
|
||||||
else if (Note.ExpiryTime is not null)
|
else if (Note.ExpiryTime is not null)
|
||||||
@@ -139,7 +143,7 @@ public sealed partial class AdminNotesLine : BoxContainer
|
|||||||
|
|
||||||
private string FormatRoleBanMessage()
|
private string FormatRoleBanMessage()
|
||||||
{
|
{
|
||||||
var banMessage = new StringBuilder($"{Loc.GetString("admin-notes-banned-from")} {string.Join(", ", Note.BannedRoles ?? new []{"unknown"})} ");
|
var banMessage = new StringBuilder($"{Loc.GetString("admin-notes-banned-from")} {string.Join(", ", Note.BannedRoles ?? new[] { "unknown" })} ");
|
||||||
return FormatBanMessageCommon(banMessage);
|
return FormatBanMessageCommon(banMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user