Chat moved up to top level now in all services frontend

This commit is contained in:
NigeParis 2026-01-10 18:09:20 +01:00 committed by Nigel
parent 814c389e38
commit b4af6e08ca
32 changed files with 687 additions and 42 deletions

View file

@ -0,0 +1,29 @@
import { Socket } from "socket.io-client";
import { getSocket } from "../chat";
import { logout } from "./logout";
import { connected } from "./connected";
import { showError } from "@app/toast";
import { setTitle } from "@app/routing";
/**
* function to quit the chat - leaves the ping-Buddies list
* @param socket
*/
export function quitChat (socket: Socket) {
try {
const systemWindow = document.getElementById('system-box') as HTMLDivElement;
const chatWindow = document.getElementById("t-chatbox") as HTMLDivElement;
if (socket) {
logout(socket);
setTitle('Chat Page');
connected(socket);
} else {
getSocket();
}
} catch (e) {
showError('Failed to Quit Chat: Unknown error');
}
};