Add per-VM autostart checkbox (single-select, persisted)

Only one VM can be marked for autostart at a time — checking a new
one unchecks the previous. Matched by host+vmid since the same vmid
can exist on multiple standalone Proxmox hosts in a cluster setup.
This commit is contained in:
2026-07-06 13:43:38 +02:00
parent 5c4e3781fd
commit 7fbac7c18a
5 changed files with 75 additions and 7 deletions
+9
View File
@@ -229,6 +229,15 @@ ipcMain.handle('settings:browseViewerPath', async () => {
return chosen;
});
// Only one VM can be marked for autostart at a time — identified by
// host+vmid since the same vmid can exist on several hosts.
ipcMain.handle('settings:getAutoConnect', () => store.get('autoConnect', null));
ipcMain.handle('settings:setAutoConnect', (_e, target) => {
if (target) store.set('autoConnect', target);
else store.delete('autoConnect');
});
// ---------- SPICE helpers ----------
function buildVVFile(params, vmid, client) {