forked from Github/frigate
Clean up copy output (#14705)
* Remove extra spacing for next/prev carousel buttons * Clarify ollama genai docs * Clean up copied gpu info output * Clean up copied gpu info output * Better display when manually copying/pasting log data
This commit is contained in:
@@ -10,6 +10,7 @@ import ActivityIndicator from "../indicators/activity-indicator";
|
||||
import { GpuInfo, Nvinfo, Vainfo } from "@/types/stats";
|
||||
import { Button } from "../ui/button";
|
||||
import copy from "copy-to-clipboard";
|
||||
import { toast } from "sonner";
|
||||
|
||||
type GPUInfoDialogProps = {
|
||||
showGpuInfo: boolean;
|
||||
@@ -30,12 +31,11 @@ export default function GPUInfoDialog({
|
||||
|
||||
const onCopyInfo = async () => {
|
||||
copy(
|
||||
JSON.stringify(gpuType == "vainfo" ? vainfo : nvinfo).replace(
|
||||
/[\\\s]+/gi,
|
||||
"",
|
||||
),
|
||||
JSON.stringify(gpuType == "vainfo" ? vainfo : nvinfo)
|
||||
.replace(/\\t/g, "\t")
|
||||
.replace(/\\n/g, "\n"),
|
||||
);
|
||||
setShowGpuInfo(false);
|
||||
toast.success("Copied GPU info to clipboard.");
|
||||
};
|
||||
|
||||
if (gpuType == "vainfo") {
|
||||
|
||||
Reference in New Issue
Block a user