Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 13 additions & 3 deletions src/routes/firehose/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,19 @@
</span>
{/if}
<span class="h-5">
<span class:hidden={msg.tags["target-user-id"]} style="color: hsl(from {msg.tags['color'] || 'gray'} h s {$mode === 'light' ? '40%' : '70%'})" class="font-bold">
{msg.displayName}:
</span>
{#if !msg.tags["target-user-id"]}
{@const c = (msg.channel || "").trim()}
{@const userId = msg.tags?.["user-id"]}
{@const u = (userId ? `id:${userId}` : msg.displayName || "").trim()}
{@const d = new Date(msg.timestamp).toISOString().slice(0, 7)}
<a
href="/logs?c={encodeURIComponent(c)}&u={encodeURIComponent(u)}&d={encodeURIComponent(d)}"
class="font-bold hover:underline"
style="color: hsl(from {msg.tags['color'] || 'gray'} h s {$mode === 'light' ? '40%' : '70%'})"
>
{msg.displayName}:
</a>
{/if}
<span class={[msg.tags["target-user-id"] && "text-neutral-500"]}>
{#key emoteUpdates}
{#each parseMessage(msg) as { type: Component, props }, index (index)}
Expand Down
22 changes: 20 additions & 2 deletions src/routes/logs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,27 @@
{msg.text}
</span>
{:else}
<span style="color: hsl(from {msg.tags['color'] || 'gray'} h s {$mode === 'light' ? '40%' : '70%'})" class="font-bold">
<a
href={`/logs?c=${encodeURIComponent((channelName || msg.channel || "").trim())}&u=${encodeURIComponent(((msg.tags?.["user-id"] ? `id:${msg.tags["user-id"]}` : msg.displayName) || "").trim())}&d=${encodeURIComponent(new Date(msg.timestamp).toISOString().slice(0, 7))}`}
class="font-bold hover:underline"
style="color: hsl(from {msg.tags['color'] || 'gray'} h s {$mode === 'light' ? '40%' : '70%'})"
onclick={(e) => {
e.preventDefault();

const href = e.currentTarget.getAttribute("href") || "";
const q = new URL(href, page.url).searchParams;

untrack(() => {
inputChannelName = channelName = q.get("c") || "";
inputUserName = userName = q.get("u") || "";
dateValue = q.get("d") || "";
});

goto(href, { keepFocus: true });
}}
>
{msg.displayName}:
</span>
</a>
<span>
{#key emoteUpdates}
{#each parseMessage(msg) as { type: Component, props }, index (index)}
Expand Down
Loading