1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 07:03:32 +08:00
Files
osu-lazer/osu.Game/Overlays/Profile/ReportUserPopover.cs
T
Krzysztof Gutkowski 2006485d60 Allow reporting users from their profile page (#36335)
This PR refactors the report popover to have an optional confirmation
message after completing the request. This was initially meant for
#32584, but then I realized I can first test it out on the user
profiles, so I've implemented it here as well. Can be reviewed commit by
commit.



https://github.com/user-attachments/assets/cd59c560-c824-4a5e-bab6-5ecbf5125af1

---------

Co-authored-by: Dean Herbert <pe@ppy.sh>
2026-05-05 19:49:24 +09:00

25 lines
814 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.Profile
{
public partial class ReportUserPopover : ReportPopover<UserReportReason>
{
private readonly APIUser user;
public ReportUserPopover(APIUser user)
: base(ReportStrings.UserTitle(user.Username))
{
this.user = user;
}
protected override APIRequest GetRequest(UserReportReason reason, string comments) => new UserReportRequest(user.Id, reason, comments);
}
}