Add website root URL and update most links to use it

For what it's worth, I intentionally didn't include news / changelog /
supporter, because these should never change.
This commit is contained in:
Dean Herbert
2020-12-24 18:11:40 +09:00
parent eb795a2127
commit 323da82477
15 changed files with 57 additions and 24 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
using osu.Game.Users;
using osuTK;
using osuTK.Graphics;
@ -27,6 +28,9 @@ namespace osu.Game.Overlays.Profile.Header
private Color4 iconColour;
[Resolved]
private IAPIProvider api { get; set; }
public BottomHeaderContainer()
{
AutoSizeAxes = Axes.Y;
@ -109,7 +113,7 @@ namespace osu.Game.Overlays.Profile.Header
}
topLinkContainer.AddText("Contributed ");
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"https://osu.ppy.sh/users/{user.Id}/posts", creationParameters: embolden);
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"{api.WebsiteRootUrl}/users/{user.Id}/posts", creationParameters: embolden);
string websiteWithoutProtocol = user.Website;