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 { useJsonRpc } from "@/hooks/useJsonRpc";
|
||||||
import { useUsbConfigModalStore } from "@/hooks/stores";
|
import { useUsbConfigModalStore } from "@/hooks/stores";
|
||||||
import ExtLink from "@components/ExtLink";
|
import ExtLink from "@components/ExtLink";
|
||||||
import { UsbConfigState } from "@/utils"
|
import { UsbConfigState } from "@/hooks/stores"
|
||||||
|
|
||||||
export default function USBConfigDialog({
|
export default function USBConfigDialog({
|
||||||
open,
|
open,
|
||||||
|
|
|
@ -26,7 +26,7 @@ import { LocalDevice } from "@routes/devices.$id";
|
||||||
import { useRevalidator } from "react-router-dom";
|
import { useRevalidator } from "react-router-dom";
|
||||||
import { ShieldCheckIcon } from "@heroicons/react/20/solid";
|
import { ShieldCheckIcon } from "@heroicons/react/20/solid";
|
||||||
import USBConfigDialog from "@components/USBConfigDialog";
|
import USBConfigDialog from "@components/USBConfigDialog";
|
||||||
import { UsbConfigState } from "@/utils"
|
import { UsbConfigState } from "@/hooks/stores"
|
||||||
|
|
||||||
export function SettingsItem({
|
export function SettingsItem({
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -538,6 +538,14 @@ interface UsbConfigModalState {
|
||||||
setErrorMessage: (message: string | null) => void;
|
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 => ({
|
export const useUsbConfigModalStore = create<UsbConfigModalState>(set => ({
|
||||||
modalView: "updateUsbConfig",
|
modalView: "updateUsbConfig",
|
||||||
errorMessage: null,
|
errorMessage: null,
|
||||||
|
|
|
@ -232,11 +232,3 @@ export function isChromeOS() {
|
||||||
/* ChromeOS sets navigator.platform to Linux :/ */
|
/* ChromeOS sets navigator.platform to Linux :/ */
|
||||||
return !!navigator.userAgent.match(" CrOS ");
|
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