From 1468e8b8dd75ef98d86ba4460a5019f0a56e8b0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 12:16:27 +0000 Subject: [PATCH 1/2] Initial plan From e4bc3b2b2850cee6ac0bc0a08b5a085c6157b69e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Sep 2025 12:29:18 +0000 Subject: [PATCH 2/2] fix: prevent replace failed node without selecting a node Co-authored-by: robertsLando <11502495+robertsLando@users.noreply.github.com> --- src/components/dialogs/DialogNodesManager.vue | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/components/dialogs/DialogNodesManager.vue b/src/components/dialogs/DialogNodesManager.vue index 346be7b6b5..eee5d6cc77 100644 --- a/src/components/dialogs/DialogNodesManager.vue +++ b/src/components/dialogs/DialogNodesManager.vue @@ -161,9 +161,11 @@ Next @@ -952,6 +954,27 @@ export default { this.nextStep() } }, + submitReplaceFailed() { + const s = this.steps[this.currentStep - 1] + const replaceId = s.values.replaceId + + // Validate that a node has been selected + if (!replaceId) { + this.showSnackbar('Please select a node to replace', 'error') + return + } + + // Additional validation for numeric input + if (typeof replaceId !== 'object') { + const nodeId = parseInt(replaceId, 10) + if (isNaN(nodeId) || nodeId <= 0) { + this.showSnackbar('Please enter a valid node ID', 'error') + return + } + } + + this.nextStep() + }, validPin(pin) { return pin?.length === 5 || 'PIN must be 5 digits' }, @@ -1223,6 +1246,7 @@ export default { this.loading = true await this.app.apiRequest('validateDSK', [pin]) } else if (s.key === 'replaceFailed') { + // Validation should have been done in submitReplaceFailed this.currentAction = 'Inclusion' this.pushStep('replaceInclusionMode') }