diff --git a/web/app/libs/uoj-html-lib.php b/web/app/libs/uoj-html-lib.php index 9cb6fef..297d632 100644 --- a/web/app/libs/uoj-html-lib.php +++ b/web/app/libs/uoj-html-lib.php @@ -862,23 +862,39 @@ class JudgementDetailsPrinter { echo '>'; echo '
'; - echo '
'; + echo '
'; echo '

', 'Custom Test: ', '

'; echo '
'; - - echo '
'; + + if (isset($REQUIRE_LIB['bootstrap5'])) { + echo '
'; + + echo $this->styler->getTestInfoIcon($test_info); + } else { + echo '
'; + } echo htmlspecialchars($test_info); echo '
'; - echo '
'; + echo '
'; if ($test_time >= 0) { - echo 'time: ', $test_time, 'ms'; + if (isset($REQUIRE_LIB['bootstrap5'])) { + echo ' '; + } else { + echo 'time: '; + } + echo $test_time, ' ms'; } echo '
'; - echo '
'; + echo '
'; if ($test_memory >= 0) { - echo 'memory: ', $test_memory, 'kb'; + if (isset($REQUIRE_LIB['bootstrap5'])) { + echo ' '; + } else { + echo 'memory: '; + } + echo $test_memory, ' kB'; } echo '
'; @@ -1019,6 +1035,19 @@ class CustomTestSubmissionDetailsStyler { return 'card-uoj-wrong'; } } + public function getTestInfoIcon($test_info) { + if ($test_info == 'Success') { + return ' '; + } elseif ($test_info == 'Time Limit Exceeded') { + return ' '; + } elseif ($test_info == 'Acceptable Answer') { + return ' '; + } elseif ($test_info == 'Wrong Answer') { + return ' '; + } else { + return ' '; + } + } public function shouldFadeDetails($info) { return $this->fade_all_details; }