playing wiith database Blocked Users
This commit is contained in:
parent
6a53c5266f
commit
05a9c58de5
13 changed files with 291 additions and 168 deletions
|
|
@ -184,7 +184,7 @@ function handleChat(_url: string, _args: RouteHandlerParams): RouteHandlerReturn
|
|||
|
||||
let toggle = false
|
||||
window.addEventListener("focus", () => {
|
||||
if (window.location.pathname === "/app/chat" && !toggle) {
|
||||
if (window.location.pathname === "" && !toggle) {
|
||||
// bconnected.click();
|
||||
console.log("%cWindow is focused on /chat:" + socket.id, color.green);
|
||||
if (socket.id)
|
||||
|
|
@ -222,6 +222,15 @@ function handleChat(_url: string, _args: RouteHandlerParams): RouteHandlerReturn
|
|||
buddies.innerHTML = '';
|
||||
|
||||
|
||||
const value = await client.chatTest();
|
||||
if (value.kind === "success") {
|
||||
console.log(value.payload);
|
||||
} else if (value.kind === "notLoggedIn") {
|
||||
console.log('not logged in');
|
||||
} else {
|
||||
console.log('unknown response: ', value);
|
||||
}
|
||||
|
||||
const addMessage = (text: string) => {
|
||||
if (!chatWindow) return;
|
||||
const messageElement = document.createElement("div-test");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue