mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-23 07:51:53 +00:00
feat: add icon for user status
This commit is contained in:
parent
2af4a869f3
commit
fd9cc2b302
@ -139,18 +139,21 @@ function fTime($time, $gran = -1) {
|
||||
<div class="card-footer bg-transparent">
|
||||
<?php $last_visited = strtotime($user['last_visited']) ?>
|
||||
<?php if (time() - $last_visited < 60 * 15): // 15 mins ?>
|
||||
<span class="text-success fw-bold">
|
||||
<span class="text-success">
|
||||
<i class="bi bi-circle-fill"></i>
|
||||
<?= UOJLocale::get('online') ?>
|
||||
</span>
|
||||
<?php elseif ($last_visited > 0): ?>
|
||||
<span class="text-muted">
|
||||
<?= UOJLocale::get('last active at') ?>
|
||||
<?= fTime($last_visited, 0) ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="text-muted">
|
||||
<span class="text-danger">
|
||||
<i class="bi bi-circle-fill"></i>
|
||||
<?= UOJLocale::get('offline') ?>
|
||||
</span>
|
||||
<?php if ($last_visited > 0): ?>
|
||||
<span class="text-muted">
|
||||
, <?= UOJLocale::get('last active at') ?>
|
||||
<?= fTime($last_visited, 0) ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user