feat: web UI chat render, panels, presence + analytics

This commit is contained in:
h
2026-05-31 19:41:01 +02:00
parent 75425d1bee
commit ed469ba8dd
83 changed files with 6034 additions and 136 deletions
+11 -2
View File
@@ -25,6 +25,8 @@
: chats.list.filter((chat) => folderContains(selectedFolder, chat))
);
const SCROLL_THRESHOLD = 600;
$effect(() => {
if (accounts.selectedId === null) {
return;
@@ -32,9 +34,16 @@
chats.load().catch(() => toasts.error("Failed to load chats"));
folders.load().catch(() => toasts.error("Failed to load folders"));
});
function onScroll(event: Event) {
const el = event.currentTarget as HTMLElement;
if (el.scrollTop + el.clientHeight >= el.scrollHeight - SCROLL_THRESHOLD) {
chats.loadMore().catch(() => undefined);
}
}
</script>
<div class="chat-list custom-scroll">
<div class="chat-list custom-scroll" onscroll={onScroll}>
{#if chats.loading && chats.list.length === 0}
{#each skeletonRows as index (index)}
<div class="row-skeleton">
@@ -53,7 +62,7 @@
class="folder-view"
in:fly={{ x: folders.direction * 24, duration: 200, easing: cubicOut }}
>
{#if visibleChats.length === 0}
{#if visibleChats.length === 0 && !chats.hasMore}
<EmptyState
title="Empty folder"
description="No chats match this folder yet"