blob: 759fd4c5768669e16ba563b9c61c9ca12c6c839b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<script lang="ts">
import { parsePlayerLog, PlayerLog } from "$lib/log_parser";
export let matchLog: string;
let playerLog: PlayerLog;
$: if (matchLog) {
playerLog = parsePlayerLog(1, matchLog);
} else {
playerLog = [];
}
</script>
<div class="output">
<h3 class="output-header">Player log</h3>
<div class="output-text stderr-text">
{playerLog.flatMap((turn) => turn.stderr).join("\n")}
</div>
</div>
<style lang="scss">
.output {
width: 100%;
overflow-y: scroll;
background-color: rgb(41, 41, 41);
padding: 15px;
}
.output-text {
color: #ccc;
}
.stderr-text {
font-family: monospace;
white-space: pre-wrap;
}
.output-header {
color: #eee;
padding-bottom: 20px;
}
</style>
|