From b716663a4fa1db510d791b45579e2ac38a48aa8e Mon Sep 17 00:00:00 2001 From: Jean Date: Sun, 5 Jul 2026 13:29:30 +0000 Subject: [PATCH] messages: show a bot icon next to a bot's nick in the log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A sender with +B (member.bot, from the WHO 'B' flag) now gets a robot badge after their nick β€” inside the on the mIRC lines () and after the nick in the grouped view. Grayscaled in yomirc to stay monochrome. --- src/components/chat/MessageList.tsx | 7 +++++-- src/index.css | 2 ++ src/themes/yomirc.css | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/chat/MessageList.tsx b/src/components/chat/MessageList.tsx index 543ad25..044aa57 100644 --- a/src/components/chat/MessageList.tsx +++ b/src/components/chat/MessageList.tsx @@ -46,6 +46,7 @@ function MsgRow({ m, cont }: { m: ChatMessage; cont: boolean }) { const togglePin = useActiveChat((s) => s.togglePin); const pinned = useActiveChat((s) => s.pins[s.active]?.some((p) => p.id === m.id) ?? false); const isOper = useActiveChat((s) => !!s.buffers[s.active]?.members[m.from]?.oper); + const isBot = useActiveChat((s) => !!s.buffers[s.active]?.members[m.from]?.bot); const linkPreviews = useActiveChat((s) => s.prefs.linkPreviews); // Avatars resolve by ACCOUNT. Live messages carry the account tag, but // chathistory-replayed ones (e.g. on a fresh mobile join) often don't β€” so @@ -76,7 +77,9 @@ function MsgRow({ m, cont }: { m: ChatMessage; cont: boolean }) {
[{fmtTime(m.ts)}]{' '} {' '} {m.redacted ? `⊘ ${t('messages.deleted')}` : formatIrc(m.text, m.self, linkPreviews)} @@ -111,7 +114,7 @@ function MsgRow({ m, cont }: { m: ChatMessage; cont: boolean }) {
{!cont && (
- + {fmtTime(m.ts)}
)} diff --git a/src/index.css b/src/index.css index 9ae7237..0732511 100644 --- a/src/index.css +++ b/src/index.css @@ -654,6 +654,8 @@ html[data-actions="off"] .msg-actions { display: none; } /* bot tag */ .member__bot { margin-left: auto; flex: none; font-size: .58rem; font-weight: 800; letter-spacing: .06em; padding: .1rem .35rem; border-radius: 5px; background: #e8ecff; color: #4458c8; } +/* Bot icon after a bot's nick in the message list. */ +.nick-bot { font-size: .82em; margin-left: .15em; vertical-align: baseline; } /* visible IRC operators (no +H) β€” IRCop nick colour (IRC colour 10), consistent everywhere */ diff --git a/src/themes/yomirc.css b/src/themes/yomirc.css index aa06a75..118e9b7 100644 --- a/src/themes/yomirc.css +++ b/src/themes/yomirc.css @@ -110,7 +110,8 @@ [data-theme^="yomirc"] .appbar__act, [data-theme^="yomirc"] .composer__emoji, [data-theme^="yomirc"] .composer__fmtbtn, -[data-theme^="yomirc"] .composer__add { filter: grayscale(1); opacity: .8; } +[data-theme^="yomirc"] .composer__add, +[data-theme^="yomirc"] .nick-bot { filter: grayscale(1); opacity: .8; } [data-theme^="yomirc"] .topbar__search:hover, [data-theme^="yomirc"] .tab:hover .tab__ic, [data-theme^="yomirc"] .appbar__act:hover,