(".day-separator");
- let day: string | null = null;
+ const stuck: string[] = [];
for (const sep of seps) {
- if (sep.getBoundingClientRect().top <= limit) {
- day = sep.dataset.day ?? null;
+ if (sep.getBoundingClientRect().top <= limit && sep.dataset.day) {
+ stuck.push(sep.dataset.day);
}
}
- stuckDay = day;
+ stuckDay = stuck.pop() ?? null;
+ passedDays = new Set(stuck);
}
async function loadInitial() {
@@ -252,6 +297,7 @@
await tick();
scrollToBottom();
updateStuck();
+ setTimeout(updateStuck, SETTLE_DELAY);
} catch {
toasts.error(t("thread.loadFailed"));
} finally {
@@ -394,6 +440,13 @@
}
}
+ function openCalendar(event: MouseEvent, iso: string) {
+ const date = new Date(iso);
+ calendarAnchor = event.currentTarget as HTMLElement;
+ calendarMonth = { month: date.getUTCMonth(), year: date.getUTCFullYear() };
+ calendarOpen = true;
+ }
+
function openMedia(message: MessageView, index: number) {
mediaItems = viewerItemsFrom(message.message_id, message.media);
mediaIndex = index;
@@ -581,15 +634,29 @@
{/if}
{#each rows as row (row.message.message_id)}
+ {#each row.gapsBefore as gap (gap.start)}
+ {@render gapLine(gap)}
+ {/each}
{#if row.daySeparator}
- {row.daySeparator}
+
{/if}
+ {#each row.gapsAfter as gap (gap.start)}
+ {@render gapLine(gap)}
+ {/each}
{#if row.message.service}
{:else}
@@ -625,6 +692,20 @@
{/if}
+{#snippet gapLine(
+ gap: CaptureGap
+)}
+
+ {t("chat.gap", { range: formatSpanRange(gap.start, gap.end) })}
+
+{/snippet}
+
+
diff --git a/frontend/src/lib/components/MessageMedia.svelte b/frontend/src/lib/components/MessageMedia.svelte
index d18adaf..9c68474 100644
--- a/frontend/src/lib/components/MessageMedia.svelte
+++ b/frontend/src/lib/components/MessageMedia.svelte
@@ -1,4 +1,6 @@
- {#if message.edited_at}
+ {#if noted}
{/if}
- {formatTime(message.date)}
+ {#if message.deleted_at}
+
+ {t("chat.deletedAt", { when: formatStamp(message.deleted_at) })}
+
+ {/if}
+ {#if message.edited_at}
+
+ {/if}
+
+ {#if tip}
+ {exact}
+ {/if}
{#if own}
@@ -34,6 +90,8 @@
diff --git a/frontend/src/lib/components/profile/ChatCalendar.svelte b/frontend/src/lib/components/profile/ChatCalendar.svelte
index 0801963..587a78c 100644
--- a/frontend/src/lib/components/profile/ChatCalendar.svelte
+++ b/frontend/src/lib/components/profile/ChatCalendar.svelte
@@ -1,40 +1,42 @@
+
+