1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 21:58:06 -05:00

Add a tooltip for client profile total playtime for hours (#334)

This commit is contained in:
Amos 2024-07-23 00:38:43 +01:00 committed by GitHub
parent bc3bd5b0f2
commit b1810b0517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,11 +112,13 @@ namespace IW4MAdmin.Application.Meta
return metaList;
}
metaList.Add(new InformationResponse()
var friendlyTime = TimeSpan.FromHours(client.TotalConnectionTime / 3600.0);
metaList.Add(new InformationResponse
{
ClientId = client.ClientId,
Key = _transLookup["WEBFRONT_PROFILE_META_PLAY_TIME"],
Value = TimeSpan.FromHours(client.TotalConnectionTime / 3600.0).HumanizeForCurrentCulture(),
Value = friendlyTime.HumanizeForCurrentCulture(),
ToolTipText = $"{friendlyTime.TotalHours:N1} hour(s)",
ShouldDisplay = true,
Order = 8,
Type = MetaType.Information