ReportsPanel
A class in Root.Township, Alta.Meta.UI.ServerManagement.
Client panel listing player report summaries from the API, with accept and decline buttons. Works like InboxPanel but only for reports, probably for moderators.
- Listed in Menus, UI and platforms
- Inherits or implements
PanelComponent
Constructors
| Member | What it is |
|---|---|
ReportsPanel() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private Button acceptButton | Accept button; its label comes from the selected report. |
private IAnalyticsService analyticsService | Analytics service passed to each report notification. |
private UINotification currentShowing | The report whose details are shown now. |
private Dictionary<ListElementWithButton, UINotification> dataMapping | Maps each list row to its report notification. |
private Button declineButton | Decline button; its label comes from the selected report. |
private TextRenderer infoText | Text showing the selected report's message, or "Inbox is empty". |
private ListElementWithButton playerReportElement | Row prefab cloned for each report. |
private PlayerReportSummaryPanel reportInfoPanel | Panel that shows a report summary's details. |
private ListElementWithButton selected | The selected list row. |
private UIList uiList | The list that holds the rows. |
Methods
| Member | What it is |
|---|---|
void Inject(IAnalyticsService analyticsService) | VContainer injection point that supplies the analytics service. |
override async void RefreshData() | Rebuilds the list behind a loading screen. |
5 private and internal methods
| Member | What it is |
|---|---|
private async Task<IEnumerable<UINotification>> GetAllNotifications() | Fetches all player report summaries from the API, wrapped as notifications and sorted by time. |
private async void HandleAccept(Button obj) | Accepts the shown report (with a loading screen if it asks for one) and reselects it to update the view. |
private async void HandleDecline(Button obj) | Declines the shown report behind a loading screen and reselects it. |
private void HandleSelectedElement(ListElementWithButton element) | Shows the selected report's message and sets up the accept and decline buttons for it. |
private async Task SetupInbox() | Builds a row per report, newest first, and reselects the one that was shown. |
Used in
Members of other types that take, return or hold a ReportsPanel: