From 1fa50c63ca514292a6f46acd0dc24d39716f09f4 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 7 Jul 2026 11:02:29 +0800 Subject: [PATCH] style: keep chat time and id in top row --- web/static/index.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web/static/index.html b/web/static/index.html index db275e3..c4b7b6c 100644 --- a/web/static/index.html +++ b/web/static/index.html @@ -84,11 +84,11 @@ .chat-item.deleted { background: #f8fafc; border-color: #e2e8f0; opacity: .78; } .chat-item.deleted::before { background: #94a3b8; } .chat-item.deleted .chat-text { color: #94a3b8; text-decoration: line-through; } - .chat-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; } + .chat-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; } .chat-user-line { display: flex; align-items: center; gap: 6px; min-width: 0; } .chat-user { font-weight: 700; color: #2563eb; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .chat-uid { color: #94a3b8; font-size: 11px; font-weight: 500; } - .chat-meta-line { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; } + .chat-meta-line { display: flex; align-items: center; justify-content: flex-end; gap: 5px; white-space: nowrap; } .chat-time { flex-shrink: 0; font-size: 11px; color: #9ca3af; white-space: nowrap; } .chat-id-pill { color: #64748b; font-size: 11px; background: #f1f5f9; border-radius: 999px; padding: 1px 6px; } .chat-status { font-size: 11px; border-radius: 999px; padding: 1px 6px; line-height: 16px; background: #eff6ff; color: #2563eb; white-space: nowrap; } @@ -190,8 +190,11 @@ .scroll-area { height: 40vh; min-height: 280px; flex: none; } .chat-item { padding: 8px; } .chat-item { margin-bottom: 8px; padding: 6px 7px 6px 12px; } - .chat-head { grid-template-columns: 1fr; gap: 3px; } - .chat-meta-line { justify-content: flex-start; } + .chat-head { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; } + .chat-user-line { min-width: 0; } + .chat-user { max-width: 42vw; } + .chat-uid { display: none; } + .chat-meta-line { justify-content: flex-end; } .chat-foot { align-items: flex-start; } .chat-actions { justify-content: flex-end; margin-left: auto; } .chat-text { margin-top: 4px; padding: 5px 7px; background: #f8fafc; border-radius: 8px; line-height: 1.35; }