Fixed in / out chat notification system info
This commit is contained in:
parent
2e422eee2a
commit
7e644fe658
7 changed files with 28 additions and 41 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue