A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import { getStats } from "../../common/ajax/Messages";
import { Credentials } from "../../common/global/Credentials"; import log from "loglevel";
export async function stats(): Promise<void> { const stats = await getStats(Credentials.authToken); $("#totalMessages").each((i, el) => { el.textContent = stats.totalMessages.toString(); }); $("#totalUsers").each((i, el) => { el.textContent = stats.totalUsers.toString(); }); $("#totalOnlineUsers").each((i, el) => { el.textContent = stats.totalOnlineUsers.toString(); }); $("#numMessagesToday").each((i, el) => { el.textContent = stats.numMessagesToday.toString(); }); log.debug(stats); }
|