1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Update join date definition.

This commit is contained in:
Huo Yaoyuan 2017-06-16 20:32:11 +08:00
parent 69270814d5
commit fe3cbb7072
2 changed files with 12 additions and 5 deletions

View File

@ -306,7 +306,7 @@ namespace osu.Game.Overlays.Profile
if (user.IsSupporter) supporterTag.Show(); if (user.IsSupporter) supporterTag.Show();
if(!string.IsNullOrEmpty(user.Colour)) if (!string.IsNullOrEmpty(user.Colour))
{ {
colourBar.Colour = OsuColour.FromHex(user.Colour); colourBar.Colour = OsuColour.FromHex(user.Colour);
colourBar.Show(); colourBar.Show();
@ -329,8 +329,15 @@ namespace osu.Game.Overlays.Profile
} }
infoTextLeft.NewParagraph(); infoTextLeft.NewParagraph();
infoTextLeft.AddText("Joined "); if (user.JoinDate.ToUniversalTime().Year < 2008)
infoTextLeft.AddText(user.JoinDate, boldItalic); {
infoTextLeft.AddText("Here since the beginning", boldItalic);
}
else
{
infoTextLeft.AddText("Joined ");
infoTextLeft.AddText(user.JoinDate.LocalDateTime.ToShortDateString(), boldItalic);
}
infoTextLeft.NewLine(); infoTextLeft.NewLine();
infoTextLeft.AddText("Last seen "); infoTextLeft.AddText("Last seen ");
infoTextLeft.AddText(user.LastVisit.LocalDateTime.ToShortDateString(), boldItalic); infoTextLeft.AddText(user.LastVisit.LocalDateTime.ToShortDateString(), boldItalic);

View File

@ -12,8 +12,8 @@ namespace osu.Game.Users
[JsonProperty(@"id")] [JsonProperty(@"id")]
public long Id = 1; public long Id = 1;
[JsonProperty(@"joinDate")] [JsonProperty(@"join_date")]
public string JoinDate; public DateTimeOffset JoinDate;
[JsonProperty(@"username")] [JsonProperty(@"username")]
public string Username; public string Username;