From e119d9c83135987fffd978cf2015481f344b2756 Mon Sep 17 00:00:00 2001
From: Truong Vo <41848815+vmtruong301296@users.noreply.github.com>
Date: Tue, 2 Dec 2025 14:59:48 +0700
Subject: [PATCH] =?UTF-8?q?ch=E1=BB=A9c=20n=C4=83ng=20copy=20=E1=BB=9F=20t?=
=?UTF-8?q?=E1=BA=A5t=20c=E1=BA=A3=20c=C3=A1c=20view=20c=C3=B3=20PID,=20SN?=
=?UTF-8?q?,=20full=20PID=20+=20SN?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FRONTEND/src/components/CardLine.tsx | 43 ++++++++++++++---
FRONTEND/src/components/CopyIcon.tsx | 46 ++++++++++++++++++
FRONTEND/src/components/DragTabs.tsx | 2 +-
FRONTEND/src/components/ModalTerminal.tsx | 59 +++++++++++++++++++++--
4 files changed, 139 insertions(+), 11 deletions(-)
create mode 100644 FRONTEND/src/components/CopyIcon.tsx
diff --git a/FRONTEND/src/components/CardLine.tsx b/FRONTEND/src/components/CardLine.tsx
index bc6ff2a..8a22305 100644
--- a/FRONTEND/src/components/CardLine.tsx
+++ b/FRONTEND/src/components/CardLine.tsx
@@ -10,6 +10,7 @@ import { notifications } from "@mantine/notifications";
import { listBaudDefault } from "../untils/constanst";
import { IconCaretRight } from "@tabler/icons-react";
import { motion } from "motion/react";
+import CopyIcon from "./CopyIcon";
const CardLine = ({
line,
@@ -220,14 +221,17 @@ const CardLine = ({
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
+ if (!line?.inventory?.pid) return;
navigator.clipboard.writeText(
- `PID: ${line?.inventory?.pid || ""} | SN: ${
- line?.inventory?.sn || ""
- }`
+ line?.inventory?.pid || ""
);
}}
className={`${classes.info_line} ${classes.buttonCopy}`}
fs={"italic"}
+ style={{
+ opacity: line?.inventory?.pid ? 1 : 0.5,
+ cursor: line?.inventory?.pid ? "pointer" : "default",
+ }}
>
{line?.inventory?.pid || ""}
@@ -238,6 +242,14 @@ const CardLine = ({
) : (
""
)}
+ {line?.inventory?.pid && (
+