1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 07:42:55 +08:00

use wiki article page when failed fetch

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-04 23:59:11 +07:00
parent 5ee77925e4
commit 4cf3381d0b
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -11,7 +11,6 @@ using osu.Game.Online.API;
using osu.Game.Online.API.Requests; using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.Wiki; using osu.Game.Overlays.Wiki;
using osu.Game.Overlays.Wiki.Markdown;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {
@ -139,20 +138,8 @@ namespace osu.Game.Overlays
private void onFail() private void onFail()
{ {
LoadDisplay(new WikiMarkdownContainer LoadDisplay(articlePage = new WikiArticlePage($@"{api.WebsiteRootUrl}/wiki/",
{ $"Something went wrong when trying to fetch page \"{path.Value}\".\n\n[Return to the main page](Main_Page)."));
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
CurrentPath = $@"{api.WebsiteRootUrl}/wiki/",
Text = $"Something went wrong when trying to fetch page \"{path.Value}\".\n\n[Return to the main page](Main_Page).",
DocumentMargin = new MarginPadding(0),
DocumentPadding = new MarginPadding
{
Vertical = 20,
Left = 30,
Right = 50,
},
});
} }
private void showParentPage() private void showParentPage()