mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
Trims top events depending on scroll status (#1860)
* Trims top events depending on scroll status * Cleans up models and adds better OOP around logging events * Adds log entries being skipped component * Fixes type errors * Fixes tets * Styles skipping logs
This commit is contained in:
30
assets/components/LogViewer/SimpleLogItem.vue
Normal file
30
assets/components/LogViewer/SimpleLogItem.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<span class="text" v-html="colorize(logEntry.message)"></span>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { SimpleLogEntry } from "@/models/LogEntry";
|
||||
import AnsiConvertor from "ansi-to-html";
|
||||
|
||||
const ansiConvertor = new AnsiConvertor({ escapeXML: true });
|
||||
defineProps<{
|
||||
logEntry: SimpleLogEntry;
|
||||
}>();
|
||||
|
||||
const { markSearch } = useSearchFilter();
|
||||
const colorize = (value: string) => markSearch(ansiConvertor.toHtml(value));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.disable-wrap {
|
||||
.text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
white-space: pre-wrap;
|
||||
&::before {
|
||||
content: " ";
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user