From 2a2175684229a6f983b098348d6ba7f5d9a8613c Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:40:06 -0400 Subject: [PATCH] submissions(#23): admin "Submissions" sub-tab (approve/deny) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The headline: an admin surface to triage the structured submissions. - profile-modal.html: "Submissions" sub-tab button + #adminSubmissionsSection (refresh + loading/empty + list), alongside Whitelist/Blacklist/Blocked videos/Moderators. - ProfileAdminController: adds "submissions" to the sub-tab machinery (button + section maps, selectAdminSubtab dispatch, refreshAdminPaneState populate), gates the tab on FEATURE_SUBMISSIONS, and wires the list/refresh listeners. - js/ui/profileModal/submissionsSection.js (extracted to keep the controller under the 1200-line cap, like blockedVideosSection.js): populate/render + approve/deny. Approve (applications only) → accessControl.addToWhitelist(actor, applicant) + markSubmissionResolved(approved) + refresh the whitelist; Deny/Dismiss → markSubmissionResolved(denied). Optimistic remove; re-sync on failure. Cards show the type badge + claimed applicant + body. - tailwind.source.css: .submission-card* (token-only). Gated by FEATURE_SUBMISSIONS (tab hidden when off). Lint + build clean; profile-modal-controller tests 26/26. Co-Authored-By: Claude Opus 4.8 --- components/profile-modal.html | 71 +++++++ css/tailwind.source.css | 54 +++++ js/ui/profileModal/ProfileAdminController.js | 51 ++++- js/ui/profileModal/submissionsSection.js | 204 +++++++++++++++++++ 4 files changed, 378 insertions(+), 2 deletions(-) create mode 100644 js/ui/profileModal/submissionsSection.js diff --git a/components/profile-modal.html b/components/profile-modal.html index dcf9b2c7..ba70415b 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -1877,6 +1877,77 @@ > Moderators + + + +