style(design): FINDING-004 — add empty state for logs page

When no sync run is selected, the logs page was completely blank
below the controls. Added a guidance message with icon explaining
what to do. Hides automatically when a run is selected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-04-02 13:16:51 +00:00
parent e8c5398499
commit 060b63bce9
2 changed files with 11 additions and 1 deletions

View File

@@ -95,12 +95,15 @@ async function selectRun(runId) {
const ddMobile = document.getElementById('runsDropdownMobile');
if (ddMobile && ddMobile.value !== runId) ddMobile.value = runId;
const emptyState = document.getElementById('logEmptyState');
if (!runId) {
document.getElementById('logViewerSection').style.display = 'none';
if (emptyState) emptyState.style.display = '';
return;
}
document.getElementById('logViewerSection').style.display = '';
if (emptyState) emptyState.style.display = 'none';
const logRunIdEl = document.getElementById('logRunId'); if (logRunIdEl) logRunIdEl.textContent = runId;
document.getElementById('logStatusBadge').innerHTML = '...';
document.getElementById('textLogSection').style.display = 'none';

View File

@@ -47,6 +47,13 @@
</div>
</div>
<!-- Empty state (shown when no run selected) -->
<div id="logEmptyState" class="text-center py-5" style="color:var(--text-muted)">
<i class="bi bi-journal-text" style="font-size:2.5rem;opacity:0.4"></i>
<p class="mt-3 mb-1" style="font-size:0.9375rem">Selecteaza un sync run din lista de mai sus</p>
<p style="font-size:0.8125rem">Jurnalele arata detalii pentru fiecare sincronizare: comenzi importate, omise, erori.</p>
</div>
<!-- Detail Viewer (shown when run selected) -->
<div id="logViewerSection" style="display:none;">
<!-- Filter pills -->
@@ -102,5 +109,5 @@
{% endblock %}
{% block scripts %}
<script src="{{ request.scope.get('root_path', '') }}/static/js/logs.js?v=14"></script>
<script src="{{ request.scope.get('root_path', '') }}/static/js/logs.js?v=15"></script>
{% endblock %}