Compare commits
1 Commits
24eb458621
...
2d9aec8657
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d9aec8657 |
@@ -626,6 +626,17 @@ button {
|
||||
.md del {
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.mention {
|
||||
color: #c4b5fd;
|
||||
background: var(--accent-soft);
|
||||
border-radius: 4px;
|
||||
padding: 0 3px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.mention:hover {
|
||||
background: rgba(168, 85, 247, 0.28);
|
||||
}
|
||||
.meta-badge {
|
||||
font-family: var(--mono);
|
||||
font-size: 10px;
|
||||
|
||||
Binary file not shown.
@@ -336,6 +336,10 @@ export default function ChatPage() {
|
||||
const nameById = new Map(members.map((m) => [m.userId, m.name || m.email]))
|
||||
const authorLabel = (uid?: string) =>
|
||||
uid ? (uid === session?.user.id ? session?.user.name || 'You' : nameById.get(uid) || uid.slice(0, 8)) : 'unknown'
|
||||
const mentionName = (id: string) =>
|
||||
id === session?.user.id
|
||||
? session?.user.name || session?.user.email || 'you'
|
||||
: nameById.get(id) || id.slice(0, 8)
|
||||
|
||||
const guildById = new Map(members.map((m) => [m.userId, m]))
|
||||
const channelMembers = channelMemberIds.map(
|
||||
@@ -471,7 +475,10 @@ export default function ChatPage() {
|
||||
<span className={`meta-badge ${m.wakeup ? 'on' : ''}`}>wakeup={String(m.wakeup)}</span>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="text md" dangerouslySetInnerHTML={{ __html: renderMarkdown(m.content) }} />
|
||||
<div
|
||||
className="text md"
|
||||
dangerouslySetInnerHTML={{ __html: renderMarkdown(m.content, { resolveMention: mentionName }) }}
|
||||
/>
|
||||
{devMode ? (
|
||||
<pre className="meta-raw">
|
||||
{JSON.stringify(
|
||||
|
||||
Reference in New Issue
Block a user