From 77222c84db273710be68a53c34d2aefd8dcab3f8 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 6 Apr 2025 15:48:37 -0700 Subject: [PATCH 1/3] web: plumb target asset id and submitter --- web/src/app/mapfixes/[mapfixId]/_comments.tsx | 2 ++ web/src/app/mapfixes/[mapfixId]/page.tsx | 4 +++- web/src/app/submissions/[submissionId]/_comments.tsx | 2 ++ web/src/app/submissions/[submissionId]/page.tsx | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/src/app/mapfixes/[mapfixId]/_comments.tsx b/web/src/app/mapfixes/[mapfixId]/_comments.tsx index 7c5286a..ca42988 100644 --- a/web/src/app/mapfixes/[mapfixId]/_comments.tsx +++ b/web/src/app/mapfixes/[mapfixId]/_comments.tsx @@ -13,6 +13,8 @@ interface CreatorAndReviewStatus { creator: MapfixInfo["DisplayName"], review: MapfixInfo["StatusID"], status_message: MapfixInfo["StatusMessage"], + submitter: MapfixInfo["Submitter"], + target_asset_id: MapfixInfo["TargetAssetID"], comments: Comment[], name: string } diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index 6a1828a..e4ae480 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -43,7 +43,9 @@ function TitleAndComments(stats: CreatorAndReviewStatus) {

by {stats.creator}

+

Submitter {stats.submitter}

Model Asset ID {stats.asset_id}

+

Target Asset ID {stats.target_asset_id}

Validation Error: {stats.status_message}

@@ -76,7 +78,7 @@ export default function MapfixInfoPage() {
- +
diff --git a/web/src/app/submissions/[submissionId]/_comments.tsx b/web/src/app/submissions/[submissionId]/_comments.tsx index 8e5c84a..ddb61db 100644 --- a/web/src/app/submissions/[submissionId]/_comments.tsx +++ b/web/src/app/submissions/[submissionId]/_comments.tsx @@ -13,6 +13,8 @@ interface CreatorAndReviewStatus { creator: SubmissionInfo["DisplayName"], review: SubmissionInfo["StatusID"], status_message: SubmissionInfo["StatusMessage"], + submitter: SubmissionInfo["Submitter"], + uploaded_asset_id: SubmissionInfo["UploadedAssetID"], comments: Comment[], name: string } diff --git a/web/src/app/submissions/[submissionId]/page.tsx b/web/src/app/submissions/[submissionId]/page.tsx index 6d08bce..81502de 100644 --- a/web/src/app/submissions/[submissionId]/page.tsx +++ b/web/src/app/submissions/[submissionId]/page.tsx @@ -43,7 +43,9 @@ function TitleAndComments(stats: CreatorAndReviewStatus) {

by {stats.creator}

+

Submitter {stats.submitter}

Model Asset ID {stats.asset_id}

+

Uploaded Asset ID {stats.uploaded_asset_id}

Validation Error: {stats.status_message}

@@ -76,7 +78,7 @@ export default function SubmissionInfoPage() {
- +
-- 2.49.1 From d02e3776f3e6f9344534f059e6762e4fd0b4108f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 6 Apr 2025 15:50:08 -0700 Subject: [PATCH 2/3] web: fix page dots --- web/src/app/mapfixes/page.tsx | 4 ++-- web/src/app/submissions/page.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/app/mapfixes/page.tsx b/web/src/app/mapfixes/page.tsx index 33057ff..2945e1e 100644 --- a/web/src/app/mapfixes/page.tsx +++ b/web/src/app/mapfixes/page.tsx @@ -83,8 +83,8 @@ export default function MapfixInfoPage() { {Array.from({ length: totalPages }).map((_, index) => ( setCurrentPage(index)} + className={`dot ${index+1 === currentPage ? 'active' : ''}`} + onClick={() => setCurrentPage(index+1)} > ))} diff --git a/web/src/app/submissions/page.tsx b/web/src/app/submissions/page.tsx index e3bf37c..2ae27dd 100644 --- a/web/src/app/submissions/page.tsx +++ b/web/src/app/submissions/page.tsx @@ -81,8 +81,8 @@ export default function SubmissionInfoPage() { {Array.from({ length: totalPages }).map((_, index) => ( setCurrentPage(index)} + className={`dot ${index+1 === currentPage ? 'active' : ''}`} + onClick={() => setCurrentPage(index+1)} > ))} -- 2.49.1 From 3c3d09c4a7cebb08520d9c381360135a0297dda2 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 6 Apr 2025 15:56:02 -0700 Subject: [PATCH 3/3] web: display target asset thumbnail alongside mapfix --- web/src/app/mapfixes/[mapfixId]/page.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/web/src/app/mapfixes/[mapfixId]/page.tsx b/web/src/app/mapfixes/[mapfixId]/page.tsx index e4ae480..5316490 100644 --- a/web/src/app/mapfixes/[mapfixId]/page.tsx +++ b/web/src/app/mapfixes/[mapfixId]/page.tsx @@ -14,16 +14,24 @@ import "./(styles)/page.scss"; interface ReviewId { mapfixId: string, - mapfixStatus: number; + mapfixStatus: number, mapfixSubmitter: number, - mapfixAssetId: number; + mapfixAssetId: number, + mapfixTargetAssetId: number, } function RatingArea(mapfix: ReviewId) { return ( @@ -77,7 +85,7 @@ export default function MapfixInfoPage() {
- +
-- 2.49.1