Update dashboard components to use APIBeatmapSet

This commit is contained in:
Dean Herbert
2021-11-01 16:02:00 +09:00
parent c51349de57
commit 63c9512ab1
8 changed files with 78 additions and 102 deletions

View File

@ -56,95 +56,71 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("Set width to 300", () => content.ResizeWidthTo(300, 500));
}
private static readonly List<BeatmapSetInfo> new_beatmaps = new List<BeatmapSetInfo>
private static readonly List<APIBeatmapSet> new_beatmaps = new List<APIBeatmapSet>
{
new BeatmapSetInfo
new APIBeatmapSet
{
Metadata = new BeatmapMetadata
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Username = "author",
Id = 100
}
Username = "author",
Id = 100
},
OnlineInfo = new APIBeatmapSet
Covers = new BeatmapSetOnlineCovers
{
Covers = new BeatmapSetOnlineCovers
{
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.Now
}
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.Now
},
new BeatmapSetInfo
new APIBeatmapSet
{
Metadata = new BeatmapMetadata
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Username = "author",
Id = 100
}
Username = "author",
Id = 100
},
OnlineInfo = new APIBeatmapSet
Covers = new BeatmapSetOnlineCovers
{
Covers = new BeatmapSetOnlineCovers
{
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.MinValue
}
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.Now
}
};
private static readonly List<BeatmapSetInfo> popular_beatmaps = new List<BeatmapSetInfo>
private static readonly List<APIBeatmapSet> popular_beatmaps = new List<APIBeatmapSet>
{
new BeatmapSetInfo
new APIBeatmapSet
{
Metadata = new BeatmapMetadata
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Title = "Title",
Artist = "Artist",
Author = new User
{
Username = "author",
Id = 100
}
Username = "author",
Id = 100
},
OnlineInfo = new APIBeatmapSet
Covers = new BeatmapSetOnlineCovers
{
Covers = new BeatmapSetOnlineCovers
{
Cover = "https://assets.ppy.sh/beatmaps/1079428/covers/cover.jpg?1595295586",
},
FavouriteCount = 100
}
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.Now
},
new BeatmapSetInfo
new APIBeatmapSet
{
Metadata = new BeatmapMetadata
Title = "Very Long Title (TV size) [TATOE]",
Artist = "This artist has a really long name how is this possible",
Author = new User
{
Title = "Title 2",
Artist = "Artist 2",
Author = new User
{
Username = "someone",
Id = 100
}
Username = "author",
Id = 100
},
OnlineInfo = new APIBeatmapSet
Covers = new BeatmapSetOnlineCovers
{
Covers = new BeatmapSetOnlineCovers
{
Cover = "https://assets.ppy.sh/beatmaps/1079428/covers/cover.jpg?1595295586",
},
FavouriteCount = 10
}
Cover = "https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg?1595456608",
},
Ranked = DateTimeOffset.Now
}
};
}