Repository: amir20/dozzle (language: go)

Issue:
Default background color for ANSI logs is black instead of default
**Describe the bug**
The default background color for ANSI logs is black, regardless of whether a user is in light or dark mode. This means that if a user uses ANSI code 49 (to indicate a default background color), they'll get black. This isn't great for light mode.

**To Reproduce**
Run a docker container that logs the string `\x1b[49mHello World`. View this log in Dozzle, in light mode. This line will show up with a black background.

**Expected behavior**
ANSI color code 49 should be some sort of default background.

**Screenshots**
![Screenshot 2024-04-04 at 13 48 01](https://github.com/amir20/dozzle/assets/2469501/cc673846-daf5-4a22-a0fb-bfe9e9edee85)

**Desktop (please complete the following information):**

- OS: Mac OS
- Docker version: 26.0.0
- Browser & version: Chrome 
- Version: 6.4.2

**Proposed fix**
This is an issue that Dozzle inherits from ansi-to-html, which has a default background color of black. Changing the initialization of `AnsiConvertor` in `assets/components/LogViewer/SimpleLogItem.vue` to something like `new AnsiConvertor({ escapeXML: false, fg: "var(--base-content-color)", bg: "initial" });` seems to address the problem.

Here both `bg: "initial"` and `bg: "transparent"` work for my purposes. It's possible that setting `fg: "initial"` would also simplify matters, but fg colors currently seem fine to me.


Discussion / hints:
Nice catch. Can you send PR? Otherwise I'll look tomorrow. 
Maybe `var(--base-color)` would be better. 

Fix patch:
diff --git a/assets/components/LogViewer/SimpleLogItem.vue b/assets/components/LogViewer/SimpleLogItem.vue
index 50c415d8d86b..8e1672243511 100644
--- a/assets/components/LogViewer/SimpleLogItem.vue
+++ b/assets/components/LogViewer/SimpleLogItem.vue
@@ -20,7 +20,11 @@ import { decodeXML } from "entities";
 import AnsiConvertor from "ansi-to-html";
 import stripAnsi from "strip-ansi";
 
-const ansiConvertor = new AnsiConvertor({ escapeXML: false, fg: "var(--base-content-color)" });
+const ansiConvertor = new AnsiConvertor({
+  escapeXML: false,
+  fg: "var(--base-content-color)",
+  bg: "var(--base-color)",
+});
 
 defineProps<{
   logEntry: SimpleLogEntry;


Test patch: