Compare commits

...

2 Commits

Author SHA1 Message Date
Adrian c5961acbb5 removed trailing characters 2025-01-28 19:57:21 -06:00
Adrian abd95ab161 added VirtualMediaEnabled config 2025-01-25 22:18:50 -06:00
2 changed files with 17 additions and 15 deletions

View File

@ -31,6 +31,7 @@ type Config struct {
LocalAuthMode string `json:"localAuthMode"` //TODO: fix it with migration
WakeOnLanDevices []WakeOnLanDevice `json:"wake_on_lan_devices"`
UsbConfig UsbConfig `json:"usb_config"`
VirtualMediaEnabled bool `json:"virtual_media_enabled"`
}
const configPath = "/userdata/kvm_config.json"
@ -38,9 +39,10 @@ const configPath = "/userdata/kvm_config.json"
var defaultConfig = &Config{
CloudURL: "https://api.jetkvm.com",
AutoUpdateEnabled: true, // Set a default value
VirtualMediaEnabled: true,
UsbConfig: UsbConfig{
VendorId: "0x1d6b", //The Linux Foundation
ProductId: "0x0104", //Multifunction Composite Gadget¬
ProductId: "0x0104", //Multifunction Composite Gadget
SerialNumber: "",
Manufacturer: "JetKVM",
Product: "JetKVM USB Emulation Device",

View File

@ -39,7 +39,7 @@ export function Dialog({ setOpen }: { setOpen: (open: boolean) => void }) {
const handleUsbConfigChange = useCallback((usbConfig: object) => {
send("setUsbConfig", { usbConfig }, resp => {
if ("error" in resp) {
setError(`Failed to update USB Config: ${resp.error.data || "Unknown error"}`,);
setError(`Failed to update USB Config: ${resp.error.data || "Unknown error"}`);
return;
}
setModalView("updateUsbConfigSuccess");