diff --git a/apps/web/app/dashboard/charge-points/page.tsx b/apps/web/app/dashboard/charge-points/page.tsx
index c03d05e..f4f80b7 100644
--- a/apps/web/app/dashboard/charge-points/page.tsx
+++ b/apps/web/app/dashboard/charge-points/page.tsx
@@ -13,6 +13,7 @@ import {
Spinner,
Table,
TextField,
+ Tooltip,
} from "@heroui/react";
import {
Plus,
@@ -424,12 +425,33 @@ export default function ChargePointsPage() {
{chargePoints.map((cp) => (
-
- {cp.chargePointIdentifier}
-
+
+
+
+
+
+ {cp.chargePointIdentifier}
+
+
+
+
+ {cp.lastHeartbeatAt
+ ? dayjs().diff(dayjs(cp.lastHeartbeatAt), "second") < 120
+ ? "在线"
+ : "离线"
+ : "从未连接"}
+
+
{isAdmin && (
diff --git a/apps/web/app/dashboard/charge/page.tsx b/apps/web/app/dashboard/charge/page.tsx
index 0889c0c..7e66488 100644
--- a/apps/web/app/dashboard/charge/page.tsx
+++ b/apps/web/app/dashboard/charge/page.tsx
@@ -265,7 +265,7 @@ export default function ChargePage() {
});
const selectedCp = chargePoints.find((cp) => cp.id === selectedCpId) ?? null;
- const myTags = idTags.filter((t) => t.status === "Accepted");
+ const myTags = idTags?.filter((t) => t.status === "Accepted") ?? [];
const startMutation = useMutation({
mutationFn: async () => {