From 80e48cfd8e690aa4c2ca7dc7008c6ac4784af0a9 Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Tue, 23 Nov 2021 16:28:20 -0700 Subject: [PATCH] logs monospace no new line in between --- ui/src/app/components/logs/logs.page.html | 2 +- ui/src/app/components/logs/logs.page.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/app/components/logs/logs.page.html b/ui/src/app/components/logs/logs.page.html index 845488486..de07608b2 100644 --- a/ui/src/app/components/logs/logs.page.html +++ b/ui/src/app/components/logs/logs.page.html @@ -11,7 +11,7 @@
-
+
diff --git a/ui/src/app/components/logs/logs.page.ts b/ui/src/app/components/logs/logs.page.ts index c11a5dffd..cbc50d58c 100644 --- a/ui/src/app/components/logs/logs.page.ts +++ b/ui/src/app/components/logs/logs.page.ts @@ -66,7 +66,7 @@ export class LogsPage { const container = document.getElementById('container') const beforeContainerHeight = container.scrollHeight const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement - newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n\n') + (logs.length ? '\n\n' : '') + newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n') + (logs.length ? '\n' : '') container.prepend(newLogs) const afterContainerHeight = container.scrollHeight @@ -89,7 +89,7 @@ export class LogsPage { const container = document.getElementById('container') const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement - newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n\n') + (logs.length ? '\n\n' : '') + newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n') + (logs.length ? '\n' : '') container.append(newLogs) this.loadingMore = false this.scrollEvent()