mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Apply suggestions
This commit is contained in:
@ -7,12 +7,12 @@ using osu.Game.Online.API.Requests.Responses;
|
|||||||
|
|
||||||
namespace osu.Game.Online.API.Requests
|
namespace osu.Game.Online.API.Requests
|
||||||
{
|
{
|
||||||
public class GetSpotlightsRequest : APIRequest<SpotlightsArray>
|
public class GetSpotlightsRequest : APIRequest<SpotlightsCollection>
|
||||||
{
|
{
|
||||||
protected override string Target => "spotlights";
|
protected override string Target => "spotlights";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SpotlightsArray
|
public class SpotlightsCollection
|
||||||
{
|
{
|
||||||
[JsonProperty("spotlights")]
|
[JsonProperty("spotlights")]
|
||||||
public List<APISpotlight> Spotlights;
|
public List<APISpotlight> Spotlights;
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public DateTimeOffset EndDate;
|
public DateTimeOffset EndDate;
|
||||||
|
|
||||||
[JsonProperty(@"participant_count")]
|
[JsonProperty(@"participant_count")]
|
||||||
public int? ParticipiantCount;
|
public int? ParticipantCount;
|
||||||
|
|
||||||
public override string ToString() => Name;
|
public override string ToString() => Name;
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
|
|
||||||
public readonly Bindable<APISpotlight> SelectedSpotlight = new Bindable<APISpotlight>();
|
public readonly Bindable<APISpotlight> SelectedSpotlight = new Bindable<APISpotlight>();
|
||||||
|
|
||||||
private readonly InfoCoulmn startDateColumn;
|
private readonly InfoColumn startDateColumn;
|
||||||
private readonly InfoCoulmn endDateColumn;
|
private readonly InfoColumn endDateColumn;
|
||||||
|
|
||||||
public SpotlightSelector()
|
public SpotlightSelector()
|
||||||
{
|
{
|
||||||
@ -64,8 +64,8 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
Spacing = new Vector2(15, 0),
|
Spacing = new Vector2(15, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
startDateColumn = new InfoCoulmn(@"Start Date"),
|
startDateColumn = new InfoColumn(@"Start Date"),
|
||||||
endDateColumn = new InfoCoulmn(@"End Date"),
|
endDateColumn = new InfoColumn(@"End Date"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,9 +105,9 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
endDateColumn.Value = dateToString(spotlight.NewValue.EndDate);
|
endDateColumn.Value = dateToString(spotlight.NewValue.EndDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string dateToString(DateTimeOffset date) => $"{date.Year}-{date.Month:D2}-{date.Day:D2}";
|
private string dateToString(DateTimeOffset date) => date.ToString("yyyy-MM-dd");
|
||||||
|
|
||||||
private class InfoCoulmn : FillFlowContainer
|
private class InfoColumn : FillFlowContainer
|
||||||
{
|
{
|
||||||
public string Value
|
public string Value
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
|
|
||||||
private readonly OsuSpriteText valueText;
|
private readonly OsuSpriteText valueText;
|
||||||
|
|
||||||
public InfoCoulmn(string name)
|
public InfoColumn(string name)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Direction = FillDirection.Vertical;
|
Direction = FillDirection.Vertical;
|
||||||
|
Reference in New Issue
Block a user