fix: 934cecfd5f
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-20 11:00:01 +08:00
parent 934cecfd5f
commit 62d256835a
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 13 additions and 9 deletions

View File

@ -13,21 +13,23 @@ function getProblemTR($info) {
$html = HTML::tag_begin('tr', ['class' => 'text-center']);
$html .= HTML::tag('td', ['class' => $info['submission_id'] ? 'table-success' : ''], "#{$info['id']}");
$html .= HTML::tag_begin('td', ['class' => 'text-start']);
$html .= HTML::tag_begin('td', ['class' => 'text-start align-middle']);
$html .= $problem->getLink(['with' => 'none']);
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 align-middle">' . UOJLocale::get('problems::my problem') . '</span> ';
}
if ($info['type'] == 'remote') {
HTML::tag('a', ['class' => 'badge text-bg-success', 'href' => '/problems/remote'], '远端评测题');
HTML::tag('a', ['class' => 'badge text-bg-success align-middle', 'href' => '/problems/remote'], '远端评测题');
}
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 align-middle"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span> ';
}
if (isset($_COOKIE['show_tags_mode'])) {
$html .= HTML::tag_begin('span', ['class' => 'float-end']);
foreach ($problem->queryTags() as $tag) {
$html .= ' <a class="uoj-problem-tag">' . '<span class="badge text-bg-secondary">' . HTML::escape($tag) . '</span>' . '</a> ';
$html .= ' <a class="uoj-problem-tag">' . '<span class="badge text-bg-secondary align-middle">' . HTML::escape($tag) . '</span>' . '</a> ';
}
$html .= HTML::tag_end('span');
}
$html .= HTML::tag_end('td');
if (isset($_COOKIE['show_submit_mode'])) {
@ -35,11 +37,13 @@ function getProblemTR($info) {
$html .= HTML::tag(
'td',
[],
[
'class' => 'align-middle',
],
HTML::tag(
'div',
[
'class' => 'progress',
'class' => 'progress h-100',
'data-bs-toggle' => 'tooltip',
'data-bs-title' => "{$info['ac_num']} / {$info['submit_num']}",
'data-bs-placement' => 'bottom',

View File

@ -100,11 +100,11 @@ function getProblemTR($info) {
$html .= ' <a href="/problems?is_hidden=on"><span class="badge text-bg-danger align-middle"><i class="bi bi-eye-slash-fill"></i> ' . UOJLocale::get('hidden') . '</span></a> ';
}
if (isset($_COOKIE['show_tags_mode'])) {
echo HTML::tag_begin('span', ['class' => 'float-end']);
$html .= HTML::tag_begin('span', ['class' => 'float-end']);
foreach ($problem->queryTags() as $tag) {
$html .= ' <a class="uoj-problem-tag">' . '<span class="badge bg-secondary align-middle">' . HTML::escape($tag) . '</span>' . '</a> ';
}
echo HTML::tag_end('span');
$html .= HTML::tag_end('span');
}
$html .= HTML::tag_end('td');
if (isset($_COOKIE['show_submit_mode'])) {