mirror of https://github.com/jetkvm/kvm.git
moved UsbConfigState interface to stores
This commit is contained in:
parent
33a01abba5
commit
b7ba6f7c51
|
@ -8,7 +8,7 @@ import { InputFieldWithLabel } from "./InputField";
|
|||
import { useJsonRpc } from "@/hooks/useJsonRpc";
|
||||
import { useUsbConfigModalStore } from "@/hooks/stores";
|
||||
import ExtLink from "@components/ExtLink";
|
||||
import { UsbConfigState } from "@/utils"
|
||||
import { UsbConfigState } from "@/hooks/stores"
|
||||
|
||||
export default function USBConfigDialog({
|
||||
open,
|
||||
|
|
|
@ -26,7 +26,7 @@ import { LocalDevice } from "@routes/devices.$id";
|
|||
import { useRevalidator } from "react-router-dom";
|
||||
import { ShieldCheckIcon } from "@heroicons/react/20/solid";
|
||||
import USBConfigDialog from "@components/USBConfigDialog";
|
||||
import { UsbConfigState } from "@/utils"
|
||||
import { UsbConfigState } from "@/hooks/stores"
|
||||
|
||||
export function SettingsItem({
|
||||
title,
|
||||
|
|
|
@ -538,6 +538,14 @@ interface UsbConfigModalState {
|
|||
setErrorMessage: (message: string | null) => void;
|
||||
}
|
||||
|
||||
export interface UsbConfigState {
|
||||
vendor_id: string;
|
||||
product_id: string;
|
||||
serial_number: string;
|
||||
manufacturer: string;
|
||||
product: string;
|
||||
}
|
||||
|
||||
export const useUsbConfigModalStore = create<UsbConfigModalState>(set => ({
|
||||
modalView: "updateUsbConfig",
|
||||
errorMessage: null,
|
||||
|
|
|
@ -232,11 +232,3 @@ export function isChromeOS() {
|
|||
/* ChromeOS sets navigator.platform to Linux :/ */
|
||||
return !!navigator.userAgent.match(" CrOS ");
|
||||
}
|
||||
|
||||
export interface UsbConfigState {
|
||||
vendor_id: string;
|
||||
product_id: string;
|
||||
serial_number: string;
|
||||
manufacturer: string;
|
||||
product: string;
|
||||
}
|
Loading…
Reference in New Issue