mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 16:58:40 +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">
|
<div class="card-footer bg-transparent">
|
||||||
<?php $last_visited = strtotime($user['last_visited']) ?>
|
<?php $last_visited = strtotime($user['last_visited']) ?>
|
||||||
<?php if (time() - $last_visited < 60 * 15): // 15 mins ?>
|
<?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') ?>
|
<?= UOJLocale::get('online') ?>
|
||||||
</span>
|
</span>
|
||||||
<?php elseif ($last_visited > 0): ?>
|
|
||||||
<span class="text-muted">
|
|
||||||
<?= UOJLocale::get('last active at') ?>
|
|
||||||
<?= fTime($last_visited, 0) ?>
|
|
||||||
</span>
|
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<span class="text-muted">
|
<span class="text-danger">
|
||||||
|
<i class="bi bi-circle-fill"></i>
|
||||||
<?= UOJLocale::get('offline') ?>
|
<?= UOJLocale::get('offline') ?>
|
||||||
</span>
|
</span>
|
||||||
|
<?php if ($last_visited > 0): ?>
|
||||||
|
<span class="text-muted">
|
||||||
|
, <?= UOJLocale::get('last active at') ?>
|
||||||
|
<?= fTime($last_visited, 0) ?>
|
||||||
|
</span>
|
||||||
|
<?php endif ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user