fix(submission): user profile link, button icon

This commit is contained in:
Baoshuo Ren 2023-02-17 16:55:04 +08:00
parent 8b45b03225
commit 69583714c8
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 9 additions and 5 deletions

View File

@ -105,7 +105,7 @@ if (UOJSubmission::cur()->isLatest()) {
UOJSubmission::cur()->delete();
};
$delete_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-danger';
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash-3"></i> 删除此提交记录';
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash3"></i> 删除此提交记录';
$delete_form->config['submit_container']['class'] = '';
$delete_form->config['confirm']['text'] = '你真的要删除这条提交记录吗?';
$delete_form->succ_href = "/submissions";
@ -118,7 +118,7 @@ if (UOJSubmission::cur()->isLatest()) {
UOJSubmission::cur()->deleteThisMinorVersion();
};
$delete_form->config['submit_button']['class'] = 'list-group-item list-group-item-action border-start-0 border-end-0 list-group-item-danger';
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash-3"></i> 删除当前历史记录';
$delete_form->config['submit_button']['text'] = '<i class="bi bi-trash3"></i> 删除当前历史记录';
$delete_form->config['submit_container']['class'] = '';
$delete_form->config['confirm']['text'] = '你真的要删除这条历史记录吗?删除这条历史记录不会影响其他的历史记录。';
$delete_form->succ_href = UOJSubmission::cur()->getUriForLatest();

View File

@ -609,13 +609,17 @@ class UOJSubmission {
switch ($id) {
case 'submitter':
$submitter = UOJUser::query($this->info['submitter']);
$user_profile_url = HTML::url('/user/' . $this->info['submitter']);
echo '<div class="pb-2">';
echo HTML::empty_tag('img', [
echo HTML::tag('a', [
'href' => $user_profile_url,
'class' => 'd-inline-block me-2',
], HTML::empty_tag('img', [
'src' => HTML::avatar_addr($submitter, 64),
'class' => 'uoj-user-avatar rounded me-2',
'class' => 'uoj-user-avatar rounded',
'style' => 'width: 2rem; height: 2rem;',
]);
]));
echo UOJUser::getLink($submitter);
echo '</div>';