playing wiith database Blocked Users

This commit is contained in:
NigeParis 2025-12-01 18:46:38 +01:00 committed by apetitco
parent 6a53c5266f
commit 05a9c58de5
13 changed files with 291 additions and 168 deletions

View file

@ -11,7 +11,7 @@
"devDependencies": {
"@types/js-cookie": "^3.0.6",
"typescript": "~5.9.3",
"vite": "^7.2.4",
"vite": "^7.2.6",
"vite-tsconfig-paths": "^5.1.4"
},
"dependencies": {

View file

@ -10,7 +10,7 @@ importers:
dependencies:
'@tailwindcss/vite':
specifier: ^4.1.17
version: 4.1.17(vite@7.2.4(jiti@2.6.1)(lightningcss@1.30.2))
version: 4.1.17(vite@7.2.6(jiti@2.6.1)(lightningcss@1.30.2))
js-cookie:
specifier: ^3.0.5
version: 3.0.5
@ -31,11 +31,11 @@ importers:
specifier: ~5.9.3
version: 5.9.3
vite:
specifier: ^7.2.4
version: 7.2.4(jiti@2.6.1)(lightningcss@1.30.2)
specifier: ^7.2.6
version: 7.2.6(jiti@2.6.1)(lightningcss@1.30.2)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.2.4(jiti@2.6.1)(lightningcss@1.30.2))
version: 5.1.4(typescript@5.9.3)(vite@7.2.6(jiti@2.6.1)(lightningcss@1.30.2))
packages:
@ -635,8 +635,8 @@ packages:
vite:
optional: true
vite@7.2.4:
resolution: {integrity: sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==}
vite@7.2.6:
resolution: {integrity: sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
@ -919,12 +919,12 @@ snapshots:
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.17
'@tailwindcss/oxide-win32-x64-msvc': 4.1.17
'@tailwindcss/vite@4.1.17(vite@7.2.4(jiti@2.6.1)(lightningcss@1.30.2))':
'@tailwindcss/vite@4.1.17(vite@7.2.6(jiti@2.6.1)(lightningcss@1.30.2))':
dependencies:
'@tailwindcss/node': 4.1.17
'@tailwindcss/oxide': 4.1.17
tailwindcss: 4.1.17
vite: 7.2.4(jiti@2.6.1)(lightningcss@1.30.2)
vite: 7.2.6(jiti@2.6.1)(lightningcss@1.30.2)
'@types/estree@1.0.8': {}
@ -1139,18 +1139,18 @@ snapshots:
typescript@5.9.3: {}
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.2.4(jiti@2.6.1)(lightningcss@1.30.2)):
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.2.6(jiti@2.6.1)(lightningcss@1.30.2)):
dependencies:
debug: 4.4.3
globrex: 0.1.2
tsconfck: 3.1.6(typescript@5.9.3)
optionalDependencies:
vite: 7.2.4(jiti@2.6.1)(lightningcss@1.30.2)
vite: 7.2.6(jiti@2.6.1)(lightningcss@1.30.2)
transitivePeerDependencies:
- supports-color
- typescript
vite@7.2.4(jiti@2.6.1)(lightningcss@1.30.2):
vite@7.2.6(jiti@2.6.1)(lightningcss@1.30.2):
dependencies:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.3)

View file

@ -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");