From 61244037055f563796f36675ea01f0ba712db58c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Wed, 18 Jan 2023 16:28:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(problems):=20"=E8=BF=9C=E7=AB=AF=E8=AF=84?= =?UTF-8?q?=E6=B5=8B=E9=A2=98"=20badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/controllers/list.php | 3 +++ web/app/controllers/problem_set.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/web/app/controllers/list.php b/web/app/controllers/list.php index ad1fcf7..5a24d80 100644 --- a/web/app/controllers/list.php +++ b/web/app/controllers/list.php @@ -20,6 +20,9 @@ function getProblemTR($info) { if ($problem->isUserOwnProblem(Auth::user())) { $html .= ' ' . UOJLocale::get('problems::my problem') . ' '; } + if ($info['type'] == 'remote') { + $html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题'); + } if ($info['is_hidden']) { $html .= ' ' . UOJLocale::get('hidden') . ' '; } diff --git a/web/app/controllers/problem_set.php b/web/app/controllers/problem_set.php index 47623eb..e50dbe8 100644 --- a/web/app/controllers/problem_set.php +++ b/web/app/controllers/problem_set.php @@ -95,6 +95,9 @@ function getProblemTR($info) { if ($problem->isUserOwnProblem(Auth::user())) { $html .= ' ' . UOJLocale::get('problems::my problem') . ' '; } + if ($info['type'] == 'remote') { + $html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题'); + } if ($info['is_hidden']) { $html .= ' ' . UOJLocale::get('hidden') . ' '; }