2024-09-01 14:01:45 +02:00
|
|
|
import { translationAtom } from "@/atoms/translations-atom";
|
|
|
|
import { useAtomValue } from "jotai";
|
2023-07-22 13:07:53 +02:00
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
type GpuIdInputProps = {
|
|
|
|
gpuId: string;
|
|
|
|
handleGpuIdChange: (arg: string) => void;
|
|
|
|
};
|
|
|
|
|
|
|
|
export function GpuIdInput({ gpuId, handleGpuIdChange }) {
|
2024-09-01 14:01:45 +02:00
|
|
|
const t = useAtomValue(translationAtom);
|
|
|
|
|
2023-07-22 13:07:53 +02:00
|
|
|
return (
|
|
|
|
<div className="flex flex-col gap-2">
|
2024-09-03 09:34:58 +02:00
|
|
|
<p className="text-sm font-medium">{t("SETTINGS.GPU_ID_INPUT.TITLE")}</p>
|
2024-04-24 22:28:03 +02:00
|
|
|
<p className="text-xs text-base-content/80">
|
2024-09-03 09:34:58 +02:00
|
|
|
{t("SETTINGS.GPU_ID_INPUT.DESCRIPTION")}
|
2024-04-24 22:28:03 +02:00
|
|
|
</p>
|
2023-09-09 16:01:58 +02:00
|
|
|
{window.electron.platform === "win" && (
|
|
|
|
<p className="text-xs text-base-content/80">
|
2024-09-03 09:34:58 +02:00
|
|
|
{t("SETTINGS.GPU_ID_INPUT.ADDITIONAL_DESCRIPTION")}
|
2023-09-09 16:01:58 +02:00
|
|
|
</p>
|
|
|
|
)}
|
2023-07-22 13:07:53 +02:00
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
placeholder="Type here"
|
2024-04-24 22:28:03 +02:00
|
|
|
className="input input-bordered w-full max-w-xs"
|
2023-07-22 13:07:53 +02:00
|
|
|
value={gpuId}
|
|
|
|
onChange={handleGpuIdChange}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|