Fix newest homepage detection, file creation dates, real IP, and request log visitor type
- Fix detectNewestPage() to search subdirectories recursively and handle language prefixes - Fix getFileInfo() to preserve frontmatter created date or ctime instead of overwriting with mtime - Automatically store created date in frontmatter when creating/editing files - Add RequestLogger::getClientIp() with proxy and Cloudflare header support - Replace domain column in request log with visitor/bot type badges (Human, AI, Search, Scraper) - Update 'Activiteitenlog' to 'Activiteiten log' in UI and guide
This commit is contained in:
@@ -100,12 +100,16 @@
|
||||
<?php else: ?>
|
||||
<ul class="list-unstyled mb-0">
|
||||
<?php foreach ($recentRequests as $log): ?>
|
||||
<li class="mb-2 pb-2 border-bottom small">
|
||||
<span class="text-muted"><?= htmlspecialchars($log['time']) ?></span>
|
||||
<code class="text-muted"><?= htmlspecialchars($log['ip']) ?></code>
|
||||
<span class="text-truncate d-inline-block" style="max-width: 200px; vertical-align: bottom;"><?= htmlspecialchars($log['page']) ?></span>
|
||||
<?php if ($log['ua']): ?>
|
||||
<span class="badge bg-secondary" title="<?= htmlspecialchars($log['ua']) ?>">bot?</span>
|
||||
<li class="mb-2 pb-2 border-bottom small d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="text-muted me-1"><?= htmlspecialchars($log['time']) ?></span>
|
||||
<code class="text-muted me-1"><?= htmlspecialchars($log['ip']) ?></code>
|
||||
<span class="fw-bold"><?= htmlspecialchars($log['page']) ?></span>
|
||||
</div>
|
||||
<?php if (!empty($log['visitor_info'])): ?>
|
||||
<span class="badge bg-<?= $log['visitor_info']['badge'] ?>" title="<?= htmlspecialchars($log['ua']) ?>">
|
||||
<i class="bi <?= $log['visitor_info']['icon'] ?>"></i> <?= $log['visitor_info']['label'] ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user