mirror of https://github.com/jetkvm/kvm.git
added link to lookup usb device ids
This commit is contained in:
parent
23771e7bb6
commit
546bca4af1
|
@ -7,6 +7,7 @@ import Modal from "@components/Modal";
|
||||||
import { InputFieldWithLabel } from "./InputField";
|
import { InputFieldWithLabel } from "./InputField";
|
||||||
import { useJsonRpc } from "@/hooks/useJsonRpc";
|
import { useJsonRpc } from "@/hooks/useJsonRpc";
|
||||||
import { useUsbConfigModalStore } from "@/hooks/stores";
|
import { useUsbConfigModalStore } from "@/hooks/stores";
|
||||||
|
import ExtLink from "@components/ExtLink";
|
||||||
|
|
||||||
export interface UsbConfigState {
|
export interface UsbConfigState {
|
||||||
vendor_id: string;
|
vendor_id: string;
|
||||||
|
@ -135,18 +136,26 @@ function UpdateUsbConfigModal({
|
||||||
Set custom USB parameters to control how the USB device is emulated.
|
Set custom USB parameters to control how the USB device is emulated.
|
||||||
The device will rebind once the parameters are updated.
|
The device will rebind once the parameters are updated.
|
||||||
</p>
|
</p>
|
||||||
|
<div className="flex justify-start mt-4 text-xs text-slate-500 dark:text-slate-400">
|
||||||
|
<ExtLink
|
||||||
|
href={`https://the-sz.com/products/usbid/index.php?v=${usbConfigState.vendor_id}&p=${usbConfigState.product_id}`}
|
||||||
|
className="hover:underline"
|
||||||
|
>
|
||||||
|
Look up USB Device IDs
|
||||||
|
</ExtLink>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<InputFieldWithLabel
|
<InputFieldWithLabel
|
||||||
required
|
required
|
||||||
label="Vendor ID"
|
label="Vendor ID"
|
||||||
placeholder="Enter Vendor ID"
|
placeholder="Enter Vendor ID"
|
||||||
pattern="^0[xX][\da-fA-F]{4}$"
|
pattern="^0[xX][\da-fA-F]{4}$"
|
||||||
defaultValue={usbConfigState?.vendor_id}
|
defaultValue={usbConfigState?.vendor_id}
|
||||||
onChange={e => handleUsbVendorIdChange(e.target.value)}
|
onChange={e => handleUsbVendorIdChange(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<InputFieldWithLabel
|
<InputFieldWithLabel
|
||||||
required
|
required
|
||||||
label="Product ID"
|
label="Product ID"
|
||||||
placeholder="Enter Product ID"
|
placeholder="Enter Product ID"
|
||||||
pattern="^0[xX][\da-fA-F]{4}$"
|
pattern="^0[xX][\da-fA-F]{4}$"
|
||||||
defaultValue={usbConfigState?.product_id}
|
defaultValue={usbConfigState?.product_id}
|
||||||
|
|
|
@ -250,9 +250,9 @@ export default function SettingsSidebar() {
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
setUsbConfigJson(jsonString);
|
||||||
notifications.success(`USB Config set to ${usbConfig.product}`);
|
notifications.success(`USB Config set to ${usbConfig.product}`);
|
||||||
console.info(`usbConfigJson set to: ${usbConfigJson}`)
|
console.info(`usbConfigJson set to: ${usbConfigJson}`)
|
||||||
setUsbConfigJson(jsonString);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue