feat(problems): "远端评测题" badge

This commit is contained in:
Baoshuo Ren 2023-01-18 16:28:34 +08:00
parent 8041b49bd8
commit 6124403705
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,9 @@ function getProblemTR($info) {
if ($problem->isUserOwnProblem(Auth::user())) { if ($problem->isUserOwnProblem(Auth::user())) {
$html .= ' <span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span> '; $html .= ' <span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span> ';
} }
if ($info['type'] == 'remote') {
$html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题');
}
if ($info['is_hidden']) { if ($info['is_hidden']) {
$html .= ' <span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> '; $html .= ' <span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> ';
} }

View File

@ -95,6 +95,9 @@ function getProblemTR($info) {
if ($problem->isUserOwnProblem(Auth::user())) { if ($problem->isUserOwnProblem(Auth::user())) {
$html .= ' <a href="/problems?my=on"><span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span></a> '; $html .= ' <a href="/problems?my=on"><span class="badge text-white bg-info">' . UOJLocale::get('problems::my problem') . '</span></a> ';
} }
if ($info['type'] == 'remote') {
$html .= ' ' . HTML::tag('span', ['class' => 'badge text-bg-success'], '远端评测题');
}
if ($info['is_hidden']) { if ($info['is_hidden']) {
$html .= ' <a href="/problems?is_hidden=on"><span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span></a> '; $html .= ' <a href="/problems?is_hidden=on"><span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span></a> ';
} }