From 79ac1e1c697f78fb1fd23603083bcb30371f8ef2 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Mon, 4 Oct 2021 20:40:21 +0800 Subject: [PATCH] minor cleanup and fixes --- src/Message.svelte | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Message.svelte b/src/Message.svelte index d4bbefb..ca031b9 100644 --- a/src/Message.svelte +++ b/src/Message.svelte @@ -46,14 +46,12 @@ -
-
- {msg.from_name} 的头像 -
-
{msg.from_name}
-
{msg.text}
- -
+
+ {msg.from_name} 的头像 +
+
{msg.from_name || ' '}
+
{msg.text}
+
@@ -67,11 +65,6 @@ border-radius: 5px; display: flex; } - .message::after { - content: ''; - display: block; - clear: both; - } img { padding-right: 0.5em; } @@ -80,7 +73,7 @@ color: #1e90ff; } pre { - white-space: break-spaces; + white-space: pre-wrap; margin: 0.2em 0; } .time {