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

This commit is contained in:
hh committed 2026-05-31 19:41:37 +02:00
1 parent 75425d1bee
commit ed469ba8dd
83 files changed
+6034 -136

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ export function peerName(peer: PeerView | null): string {
return "";
}
if (peer.is_deleted_account) {
return "Deleted Account";
return "Удалённый аккаунт";
}
const parts = [peer.first_name, peer.last_name].filter(Boolean);
if (parts.length > 0) {
@@ -20,7 +20,7 @@ export function peerName(peer: PeerView | null): string {
if (peer.username) {
return `@${peer.username}`;
}
return String(peer.peer_id);
return "Удалённый аккаунт";
}
export function accountName(account: Account): string {
+21
View File
@@ -0,0 +1,21 @@
import type { PresenceSample } from "$lib/api/types";
import { formatListDate } from "$lib/format/datetime";
export function formatPresence(sample: PresenceSample): string {
switch (sample.status) {
case "online":
return "online";
case "recently":
return "last seen recently";
case "last_week":
return "last seen within a week";
case "last_month":
return "last seen within a month";
case "long_time_ago":
return "last seen a long time ago";
default:
return sample.last_online_date
? `last seen ${formatListDate(sample.last_online_date)}`
: "offline";
}
}