Skip to content

Commit 51e979c

Browse files
committed
Make pending scans section always visible
- Changed pending scans section to always display (not just when there are scans) - Shows empty state message when no pending scans - Added console logging to debug pending scans fetching - Helps users see the section exists and troubleshoot any issues
1 parent 05d1944 commit 51e979c

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

webui/src/App.jsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ function App() {
122122
try {
123123
const response = await fetch(`${API_BASE}/plex/pending-scans`);
124124
const data = await response.json();
125+
console.log('Pending scans response:', data);
125126
if (data.success) {
126127
setPendingScans(data.pending_scans || []);
128+
} else {
129+
console.error('Failed to fetch pending scans:', data.message);
127130
}
128131
} catch (error) {
129132
console.error('Failed to fetch pending scans:', error);
@@ -303,9 +306,9 @@ function App() {
303306
)}
304307
</section>
305308

306-
{pendingScans.length > 0 && (
307-
<section className="pending-scans-section">
308-
<h2>Pending Scans</h2>
309+
<section className="pending-scans-section">
310+
<h2>Pending Scans</h2>
311+
{pendingScans.length > 0 ? (
309312
<div className="pending-scans-list">
310313
{pendingScans.map((scan) => (
311314
<div key={scan.scan_id} className="pending-scan-card">
@@ -327,8 +330,12 @@ function App() {
327330
</div>
328331
))}
329332
</div>
330-
</section>
331-
)}
333+
) : (
334+
<div className="empty-state">
335+
No pending scans. Trigger a scan to see it here.
336+
</div>
337+
)}
338+
</section>
332339

333340
<section className="status-section">
334341
<h2>System Status</h2>

0 commit comments

Comments
 (0)