From 7f92a5aef0346aef0c45c99575772c91982964da Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 4 Apr 2024 10:57:37 +0700 Subject: [PATCH] fix: copied logs line break (#2603) --- web/containers/ModalTroubleShoot/AppLogs.tsx | 2 +- web/containers/ModalTroubleShoot/DeviceSpecs.tsx | 2 +- web/containers/ServerLogs/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/containers/ModalTroubleShoot/AppLogs.tsx b/web/containers/ModalTroubleShoot/AppLogs.tsx index 312053d51..60151cc9d 100644 --- a/web/containers/ModalTroubleShoot/AppLogs.tsx +++ b/web/containers/ModalTroubleShoot/AppLogs.tsx @@ -45,7 +45,7 @@ const AppLogs = () => { themes="outline" className="bg-white dark:bg-secondary/50" onClick={() => { - clipboard.copy(logs.slice(-50) ?? '') + clipboard.copy(logs.slice(-50).join('\n') ?? '') }} >
diff --git a/web/containers/ModalTroubleShoot/DeviceSpecs.tsx b/web/containers/ModalTroubleShoot/DeviceSpecs.tsx index a657ffd5d..792466df3 100644 --- a/web/containers/ModalTroubleShoot/DeviceSpecs.tsx +++ b/web/containers/ModalTroubleShoot/DeviceSpecs.tsx @@ -32,7 +32,7 @@ const DeviceSpecs = () => { themes="outline" className="bg-white dark:bg-secondary/50" onClick={() => { - clipboard.copy(logs ?? '') + clipboard.copy(logs.join('\n') ?? '') }} >
diff --git a/web/containers/ServerLogs/index.tsx b/web/containers/ServerLogs/index.tsx index 39328e4c0..36e22bc1e 100644 --- a/web/containers/ServerLogs/index.tsx +++ b/web/containers/ServerLogs/index.tsx @@ -75,7 +75,7 @@ const ServerLogs = (props: ServerLogsProps) => { themes="outline" className="bg-white dark:bg-secondary/50" onClick={() => { - clipboard.copy(logs.slice(-100) ?? '') + clipboard.copy(logs.slice(-100).join('\n') ?? '') }} >