feat(web/problems): my_problem badge

This commit is contained in:
Baoshuo Ren 2022-10-08 12:07:49 +08:00
parent a90815b20c
commit a674a54e8b
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
4 changed files with 10 additions and 10 deletions

View File

@ -37,22 +37,21 @@
} else {
echo '<td class="text-left">';
}
if ($problem['uploader'] == $myUser['username']) {
echo ' <span class="text-info">[我的题目]</span> ';
}
echo '<a ';
if (isset($REQUIRE_LIB['bootstrap5'])) {
echo ' class="text-decoration-none" ';
}
echo ' href="/problem/', $problem['id'], '">', $problem['title'], '</a>';
if ($problem['uploader'] == $myUser['username']) {
echo ' <span class="badge text-white bg-info">', UOJLocale::get('problems::my problem') ,'</span> ';
}
if ($problem['is_hidden']) {
echo ' <span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ', UOJLocale::get('hidden'), '</span> ';
}
if (isset($_COOKIE['show_tags_mode'])) {
echo ' <span class="text-info" style="font-size: 10px">' . $problem["uploader"] . '</span> ';
foreach (queryProblemTags($problem['id']) as $tag) {
if (isset($REQUIRE_LIB['bootstrap5'])) {
echo '<a class="uoj-problem-tag my-1">';

View File

@ -49,22 +49,21 @@
} else {
echo '<td class="text-left">';
}
if ($problem['uploader'] == $myUser['username']) {
echo ' <span class="text-info">[我的题目]</span> ';
}
echo '<a ';
if (isset($REQUIRE_LIB['bootstrap5'])) {
echo ' class="text-decoration-none" ';
}
echo ' href="/problem/', $problem['id'], '">', $problem['title'], '</a>';
if ($problem['uploader'] == $myUser['username']) {
echo ' <span class="badge text-white bg-info">', UOJLocale::get('problems::my problem') ,'</span> ';
}
if ($problem['is_hidden']) {
echo ' <span class="badge text-bg-danger"><i class="bi bi-eye-slash-fill"></i> ', UOJLocale::get('hidden'), '</span> ';
}
if (isset($_COOKIE['show_tags_mode'])) {
echo ' <span class="text-info" style="font-size: 10px">' . $problem["uploader"] . '</span> ';
foreach (queryProblemTags($problem['id']) as $tag) {
if (isset($REQUIRE_LIB['bootstrap5'])) {
echo '<a class="uoj-problem-tag my-1">';

View File

@ -6,6 +6,7 @@ return [
'template problems' => 'Template Problems',
'add new' => 'Add new problem',
'add new list' => 'Add new problem list',
'my problem' => 'My problem',
'title' => 'Title',
'total' => 'Total',
'ac' => 'AC',

View File

@ -6,6 +6,7 @@ return [
'template problems' => '模板题库',
'add new' => '添加新题',
'add new list' => '添加新题单',
'my problem' => '我的题目',
'title' => '标题',
'total' => '总题数',
'ac' => 'AC',