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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user