From b063b9300abaced885ff383f833c2dfddf39d5e6 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:18:36 +0200 Subject: [PATCH] Initial --- app/components/MobileNav.tsx | 6 +- app/components/layout/ChatSidebar.module.css | 7 + app/components/layout/ChatSidebar.tsx | 235 ++++----- app/components/layout/index.tsx | 10 +- app/features/chat/ChatProvider.tsx | 495 ++++++++++++++++++ app/features/chat/ChatSystemMessage.server.ts | 64 ++- app/features/chat/chat-constants.ts | 6 + app/features/chat/chat-hooks.ts | 219 +------- app/features/chat/chat-provider-types.ts | 49 ++ app/features/chat/chat-types.ts | 2 - app/features/chat/components/Chat.tsx | 19 +- app/features/chat/routes/api.chat-users.ts | 27 + app/features/chat/useChatContext.ts | 8 + .../scrims/loaders/scrims.$id.server.ts | 18 +- app/features/scrims/routes/scrims.$id.tsx | 24 - .../loaders/q.match.$id.server.ts | 24 + .../sendouq-match/routes/q.match.$id.tsx | 117 +---- .../sendouq/loaders/q.looking.server.ts | 19 + app/features/sendouq/routes/q.looking.tsx | 93 +--- .../components/StartedMatch.tsx | 98 +--- .../loaders/to.$id.matches.$mid.server.ts | 20 + .../routes/to.$id.brackets.tsx | 7 - .../routes/to.$id.matches.$mid.tsx | 77 +-- app/root.tsx | 5 +- app/routes.ts | 1 + locales/da/common.json | 2 + locales/de/common.json | 2 + locales/en/common.json | 2 + locales/es-ES/common.json | 5 +- locales/es-ES/forms.json | 3 +- locales/es-ES/front.json | 6 +- locales/es-ES/q.json | 9 +- locales/es-ES/tournament.json | 4 +- locales/es-ES/user.json | 26 +- locales/es-US/common.json | 2 + locales/fr-CA/common.json | 2 + locales/fr-EU/common.json | 2 + locales/he/common.json | 2 + locales/it/common.json | 2 + locales/ja/common.json | 2 + locales/ko/common.json | 2 + locales/nl/common.json | 2 + locales/pl/common.json | 2 + locales/pt-BR/common.json | 2 + locales/ru/common.json | 2 + locales/zh/common.json | 2 + ...19-custom-theme.js => 120-custom-theme.js} | 0 ...riends-system.js => 121-friends-system.js} | 0 ...-tournament.js => 122-saved-tournament.js} | 0 ...n-rotation.js => 123-splatoon-rotation.js} | 0 50 files changed, 898 insertions(+), 835 deletions(-) create mode 100644 app/features/chat/ChatProvider.tsx create mode 100644 app/features/chat/chat-provider-types.ts create mode 100644 app/features/chat/routes/api.chat-users.ts create mode 100644 app/features/chat/useChatContext.ts rename migrations/{119-custom-theme.js => 120-custom-theme.js} (100%) rename migrations/{120-friends-system.js => 121-friends-system.js} (100%) rename migrations/{121-saved-tournament.js => 122-saved-tournament.js} (100%) rename migrations/{122-splatoon-rotation.js => 123-splatoon-rotation.js} (100%) diff --git a/app/components/MobileNav.tsx b/app/components/MobileNav.tsx index 974c40ab9..6ab7e2884 100644 --- a/app/components/MobileNav.tsx +++ b/app/components/MobileNav.tsx @@ -16,6 +16,7 @@ import { Dialog, Modal, ModalOverlay } from "react-aria-components"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; import { useUser } from "~/features/auth/core/user"; +import { useChatContext } from "~/features/chat/useChatContext"; import { FriendMenu } from "~/features/friends/components/FriendMenu"; import { SENDOUQ_ACTIVITY_LABEL } from "~/features/friends/friends-constants"; import type { RootLoaderData } from "~/root"; @@ -30,7 +31,6 @@ import { Avatar } from "./Avatar"; import { EventsList } from "./EventsList"; import { SendouButton } from "./elements/Button"; import { Image } from "./Image"; -import { MOCK_TOTAL_UNREAD } from "./layout/ChatSidebar"; import { LogInButtonContainer } from "./layout/LogInButtonContainer"; import { NotificationContent, @@ -106,6 +106,7 @@ function MobileTabBar({ hasFriendInSendouQ: boolean; }) { const { t } = useTranslation(["front", "common"]); + const chatContext = useChatContext(); return (