improve comment, and do JSON.stringify automatically
This commit is contained in:
@@ -20,8 +20,8 @@ contextBridge.exposeInMainWorld('nanoDevicesAPI', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
send(deviceid, jsonstr) {
|
send(deviceid, obj) {
|
||||||
return ipcRenderer.invoke('nanodevices:send', deviceid, jsonstr)
|
return ipcRenderer.invoke('nanodevices:send', deviceid, JSON.stringify(obj))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -243,10 +243,10 @@ export const useStore = defineStore('main', {
|
|||||||
this.connected = true
|
this.connected = true
|
||||||
this.connectedId = deviceid
|
this.connectedId = deviceid
|
||||||
// TODO load profiles from device
|
// TODO load profiles from device
|
||||||
// nanoDevicesAPI.send({ profiles: "#all" }) // request profiles
|
// nanoDevicesAPI.send(deviceid, { profiles: "#all" }) // request profiles
|
||||||
// "Default Profile", for now, is the only profile after the device
|
// "Default Profile", for now, is the only profile after the device
|
||||||
// starts up, so it is also the current (eg. 'selected') profile
|
// starts up, so it is also the current (eg. 'selected') profile
|
||||||
// nanoDevicesAPI.send({ p: "Default Profile" }) // request Default Profile
|
// nanoDevicesAPI.send(deviceid, { p: "Default Profile" }) // request Default Profile
|
||||||
|
|
||||||
// TODO maybe you want to request all the profiles right now?
|
// TODO maybe you want to request all the profiles right now?
|
||||||
// or only on demand?
|
// or only on demand?
|
||||||
|
|||||||
Reference in New Issue
Block a user