Fixed in / out chat notification system info

This commit is contained in:
NigeParis 2026-01-13 11:04:37 +01:00 committed by Maix0
parent 2e422eee2a
commit 7e644fe658
7 changed files with 28 additions and 41 deletions

View file

@ -1,16 +1,13 @@
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";
import { windowStateVisable } from "./windowStateVisable";
import { windowStateHidden } from "./windowStateHidden";
/**
* function to quit the chat - leaves the ping-Buddies list
* @param socket
*
*/
export function quitChat () {
export async function quitChat () {
const chatBox = document.getElementById("chatBox")!;
const overlay = document.querySelector('#overlay')!;
@ -18,7 +15,10 @@ export function quitChat () {
if (chatBox.classList.contains('hidden')) {
// chatBox.classList.toggle('hidden');
// overlay.classList.add('opacity-60');
await windowStateVisable();
} else {
await windowStateHidden();
chatBox.classList.toggle('hidden');
overlay.classList.remove('opacity-60');
}