mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-03 18:37:19 +00:00
feat(dashboard): UGC List view and References as sortable DataTables
The UGC page's List view (models and car/rocket assemblies) and an assembly's References panel are server-side DataTables like the rest of the dashboard: sort by clicking a column heading, in either direction, with the page length and sort remembered per user. They still read /api/ugc and /api/ugc/assembly/builds, so the prefix search and filters above the list keep working; the gallery keeps its own pager and sort. /api/ugc takes reverse=1 for a sort's other direction (the model list's SQL order and the assembly sort both flip), and the references endpoint sorts by id, owner, account or state. Tests cover the reversed orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,7 @@ public:
|
||||
UgcSearch search;
|
||||
std::optional<IUgc::eProcessState> state;
|
||||
eSort sort{ eSort::NEWEST };
|
||||
bool reverse{}; // the sort's other direction (e.g. the fewest bricks first)
|
||||
uint32_t offset{};
|
||||
uint32_t limit{ 50 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user