mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 23:08:41 +00:00
feat(web/blog): username color
This commit is contained in:
parent
1ebcda02d6
commit
4e5d2dee49
@ -201,7 +201,9 @@ $comments_pag = new Paginator([
|
||||
"order by id"
|
||||
]);
|
||||
foreach ($replies as $idx => $reply) {
|
||||
$replies[$idx]['poster_realname'] = UOJUser::query($reply['poster'])['realname'];
|
||||
$reply_user = UOJUser::query($reply['poster']);
|
||||
$replies[$idx]['poster_realname'] = $reply_user['realname'];
|
||||
$replies[$idx]['poster_username_color'] = UOJUser::getUserColor($reply_user);
|
||||
$replies[$idx]['content'] = getCommentContentToDisplay($reply);
|
||||
}
|
||||
$replies_json = json_encode($replies);
|
||||
|
@ -1092,7 +1092,7 @@ function showCommentReplies(id, replies) {
|
||||
function(reply) {
|
||||
return $('<tr id="' + 'comment-' + reply.id + '" />').append(
|
||||
$('<td />').append(
|
||||
$('<div class="comtbox6">' + getUserLink(reply.poster, reply.poster_realname) + ':' + reply.content + '</div>')
|
||||
$('<div class="comtbox6">' + getUserLink(reply.poster, reply.poster_realname, reply.poster_username_color) + ':' + reply.content + '</div>')
|
||||
).append(
|
||||
$('<ul class="' + (isBootstrap5Page ? 'text-end mb-0' : 'text-right bot-buffer-no') + ' list-inline" />').append(
|
||||
'<li>' + '<small class="text-muted">' + reply.post_time + '</small>' + '</li>'
|
||||
|
Loading…
Reference in New Issue
Block a user