File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
assets/components/LogViewer Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 22 <div class =" relative flex w-full items-start gap-x-2 group-[.compact]:items-stretch" >
33 <LogStd :std =" logEntry.std" class =" shrink-0 select-none" v-if =" showStd" />
44 <RandomColorTag class =" shrink-0 select-none" :value =" host.name" v-if =" showHostname" />
5- <RandomColorTag class =" shrink-0 select-none" :value =" container.name" v-if =" showContainerName" />
5+ <RandomColorTag class =" shrink-0 select-none" :value =" container.name" v-if =" showContainerName" truncateRight />
66 <LogDate :date =" logEntry.date" v-if =" showTimestamp" class =" shrink-0 select-none" />
77 <LogLevel
88 class =" flex select-none"
Original file line number Diff line number Diff line change 11<template >
22 <div class =" tag grid w-40 overflow-hidden rounded-sm text-center text-sm text-white" >
33 <div class =" random-color col-start-1 row-start-1 brightness-75" ></div >
4- <div class =" col-start-1 row-start-1 truncate px-2 brightness-100 [direction:rtl]" >{{ value }}</div >
4+ <div class =" col-start-1 row-start-1 truncate px-2 brightness-100" :class =" truncateRight ? '[direction:rtl]' : ''" >
5+ {{ value }}
6+ </div >
57 </div >
68</template >
79<script lang="ts">
@@ -29,8 +31,9 @@ const colors = [
2931] as const ;
3032 </script >
3133<script lang="ts" setup>
32- const { value } = defineProps <{
34+ const { value, truncateRight = false } = defineProps <{
3335 value: string ;
36+ truncateRight? : boolean ;
3437}>();
3538
3639const color = computed (() => colors [Math .abs (hashCode (value )) % colors .length ]);
You can’t perform that action at this time.
0 commit comments