1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

perf: makes messages for copy and paste lazy for minor perf improvement

This commit is contained in:
Amir Raminfar
2024-03-14 08:29:16 -07:00
parent e7cabc8857
commit 09a9886423
3 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<div class="flex gap-2">
<div
class="flex min-w-[0.98rem] items-start justify-end align-bottom hover:cursor-pointer"
v-if="isSupported && message.trim() != ''"
v-if="isSupported"
:title="t('log_actions.copy_log')"
>
<span
@@ -32,7 +32,7 @@
import { LogEntry, JSONObject } from "@/models/LogEntry";
const { message, logEntry } = defineProps<{
message: string;
message: () => string;
logEntry: LogEntry<string | JSONObject>;
}>();
@@ -44,7 +44,7 @@ const { isSearching } = useSearchFilter();
const { handleJumpLineSelected } = useLogSearchContext();
async function copyLogMessageToClipBoard() {
await copy(message);
await copy(message());
if (copied.value) {
showToast(