fix(remote): offer the WoL config dialog after a failed wake too

A configured-but-broken target (host replaced NIC, command removed) had no way
out: the dialog hung off the 'no target configured' branch only, so the banner
would keep offering a Wake button that keeps failing.
This commit is contained in:
Randalix
2026-09-15 14:38:24 +02:00
parent 2f61be6e74
commit e8f7772320
+6 -2
View File
@@ -135,7 +135,11 @@ Object.assign(CodemanApp.prototype, {
? `ssh ${state.host}`
: 'no wake-on-LAN configured';
}
action.textContent = state.waking ? 'Waking …' : hasTarget ? 'Wake' : 'Configure WoL';
// After a FAILED wake the only useful next step is fixing the target (wrong MAC,
// host moved NIC, command gone) — otherwise a configured-but-broken host would be
// stuck behind a button that keeps failing with no way to edit it.
const offerConfig = !hasTarget || Boolean(state.error);
action.textContent = state.waking ? 'Waking …' : offerConfig ? 'Configure WoL' : 'Wake';
action.disabled = state.waking;
},
@@ -143,7 +147,7 @@ Object.assign(CodemanApp.prototype, {
hostWakeAction() {
const state = this._hostWake;
if (!state || !state.sessionId || state.waking) return;
if (state.wakeConfigured === 'none') {
if (state.wakeConfigured === 'none' || state.error) {
this.openWakeConfigDialog();
return;
}