1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 05:39:53 +08:00
Files
osu-lazer/osu.Game/Overlays/Comments/ReportCommentPopover.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

27 lines
1019 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.Comments
{
public partial class ReportCommentPopover : ReportPopover<CommentReportReason>
{
private readonly Comment comment;
protected override bool IsCommentRequired(CommentReportReason reason) => reason == CommentReportReason.Other;
public ReportCommentPopover(Comment comment)
: base(ReportStrings.CommentTitle(comment.User?.Username ?? comment.LegacyName ?? @"Someone"), false)
{
this.comment = comment;
}
protected override APIRequest GetRequest(CommentReportReason reason, string comments) => new CommentReportRequest(comment.Id, reason, comments);
}
}