]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add date formatting to admin-notes-unbanned (#40484)
authorKowlin <10947836+Kowlin@users.noreply.github.com>
Sun, 21 Sep 2025 15:26:22 +0000 (17:26 +0200)
committerGitHub <noreply@github.com>
Sun, 21 Sep 2025 15:26:22 +0000 (17:26 +0200)
Content.Client/Administration/UI/Notes/AdminNotesLine.xaml.cs

index ead1d8b00e5240725c2c41c304237e779f6aed34..97ddc150007a4e13a4e0b1ef57cd390d638d2289 100644 (file)
@@ -82,7 +82,11 @@ public sealed partial class AdminNotesLine : BoxContainer
 
         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;
         }
         else if (Note.ExpiryTime is not null)
@@ -139,7 +143,7 @@ public sealed partial class AdminNotesLine : BoxContainer
 
     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);
     }