added link to lookup usb device ids

This commit is contained in:
JackTheRooster 2025-02-17 22:53:23 -06:00
parent 23771e7bb6
commit 546bca4af1
2 changed files with 18 additions and 9 deletions

View File

@ -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,6 +136,14 @@ 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

View File

@ -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);
}); });
}; };