diff --git a/backend/package-lock.json b/backend/package-lock.json index b2676ea..30bbb0d 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "ripster-backend", - "version": "0.10.2-16", + "version": "0.10.2-17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ripster-backend", - "version": "0.10.2-16", + "version": "0.10.2-17", "dependencies": { "archiver": "^7.0.1", "cors": "^2.8.5", diff --git a/backend/package.json b/backend/package.json index e8a1aa0..66b88ac 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "ripster-backend", - "version": "0.10.2-16", + "version": "0.10.2-17", "private": true, "type": "commonjs", "scripts": { diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0424c08..fbf7bf8 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "ripster-frontend", - "version": "0.10.2-16", + "version": "0.10.2-17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ripster-frontend", - "version": "0.10.2-16", + "version": "0.10.2-17", "dependencies": { "primeicons": "^7.0.0", "primereact": "^10.9.2", diff --git a/frontend/package.json b/frontend/package.json index 22ebfe4..d9cc3d3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "ripster-frontend", - "version": "0.10.2-16", + "version": "0.10.2-17", "private": true, "type": "module", "scripts": { diff --git a/frontend/src/pages/DashboardPage.jsx b/frontend/src/pages/DashboardPage.jsx index 558a4fb..4020f68 100644 --- a/frontend/src/pages/DashboardPage.jsx +++ b/frontend/src/pages/DashboardPage.jsx @@ -1794,6 +1794,11 @@ export default function DashboardPage({ }; const openInsertQueueDialog = async (afterEntryId) => { + const hasJob = (queueState?.runningJobs || []).some((i) => i.jobId != null) + || (queueState?.queuedJobs || []).some((i) => i.jobId != null); + if (!hasJob) { + return; + } setInsertQueueDialog({ visible: true, afterEntryId: afterEntryId ?? null }); try { const [scriptsRes, chainsRes] = await Promise.allSettled([api.getScripts(), api.getScriptChains()]); @@ -1971,6 +1976,8 @@ export default function DashboardPage({ const queueRunningJobs = Array.isArray(queueState?.runningJobs) ? queueState.runningJobs : []; const queuedJobs = Array.isArray(queueState?.queuedJobs) ? queueState.queuedJobs : []; const canReorderQueue = queuedJobs.length > 1 && !queueReorderBusy; + const queueHasJobEntry = queueRunningJobs.some((i) => i.jobId != null) + || queuedJobs.some((i) => i.jobId != null); const buildRunningQueueScriptKey = (jobId) => `running-${normalizeJobId(jobId) || '-'}`; const buildQueuedQueueScriptKey = (entryId) => `queued-${Number(entryId) || '-'}`; const toggleQueueScriptDetails = (key) => { @@ -2578,7 +2585,8 @@ export default function DashboardPage({ + {queueHasJobEntry ? ( + + ) : null} ); })} diff --git a/package-lock.json b/package-lock.json index 64e4aed..3edb3ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ripster", - "version": "0.10.2-16", + "version": "0.10.2-17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ripster", - "version": "0.10.2-16", + "version": "0.10.2-17", "devDependencies": { "concurrently": "^9.1.2" } diff --git a/package.json b/package.json index fcce2a6..3c4f216 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ripster", "private": true, - "version": "0.10.2-16", + "version": "0.10.2-17", "scripts": { "dev": "concurrently \"npm run dev --prefix backend\" \"npm run dev --prefix frontend\"", "dev:backend": "npm run dev --prefix backend",