Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/routes/logs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1115,12 +1115,16 @@
<div class="group !w-auto min-w-full text-nowrap" slot="item" let:index let:style {style}>
{@const msg = filteredChatLogs[index]}
{@const msgId = getMessageId(msg)}
{@const dayKey = dayjs(msg.timestamp).format("YYYY-MM-DD")}
{@const prevDayKey = index > 0 ? dayjs(filteredChatLogs[index - 1].timestamp).format("YYYY-MM-DD") : null}
{@const isNewDay = index > 0 && prevDayKey !== dayKey}
{@const isHashMatch = msgId === page.url.hash.slice(1)}
{@const isJumpMatch = isJumpSearching && !isHashMatch && jumpHighlights?.has(msgId)}
{@const isHighlight = Boolean(msg.tags["system-msg"]) || msg.tags["bits"] || msg.tags["msg-id"] === "announcement"}
<div
class={[
"flex h-5 w-full items-center gap-x-1 px-3",
isNewDay && "-mt-[1px] border-t border-dashed border-black/25 dark:border-white/10",
(isHashMatch && "bg-zinc-200 dark:bg-zinc-800") || (isJumpMatch && "bg-zinc-100 dark:bg-zinc-900") || (isHighlight && "bg-purple-600/30"),
]}
>
Expand Down