From 01864e554c352a6870966248da8396e0e0d30d30 Mon Sep 17 00:00:00 2001 From: ReDBrother Date: Wed, 6 Sep 2023 22:02:21 +0300 Subject: [PATCH] minor fixes --- .../app/apps/codebattle/assets/css/style.scss | 38 ++++++++++++++++++- .../assets/js/widgets/components/UserName.jsx | 4 +- .../js/widgets/pages/game/AnimationModal.jsx | 2 +- .../widgets/pages/game/GameActionButtons.jsx | 7 ++-- .../widgets/pages/lobby/ChatActionModal.jsx | 4 +- .../js/widgets/pages/lobby/LobbyWidget.jsx | 6 ++- services/app/apps/codebattle/yarn.lock | 6 +-- 7 files changed, 55 insertions(+), 12 deletions(-) diff --git a/services/app/apps/codebattle/assets/css/style.scss b/services/app/apps/codebattle/assets/css/style.scss index 0e0fb9b52..be4b0afb5 100644 --- a/services/app/apps/codebattle/assets/css/style.scss +++ b/services/app/apps/codebattle/assets/css/style.scss @@ -427,7 +427,11 @@ a { } } -.cb-lobby-widget-container, +.cb-lobby-widget-container { + min-height: 400px; + max-height: 500px; +} + .cb-messages-container { height: 400px; @@ -808,3 +812,35 @@ a:hover{ .cb-left-scroll-control { background: linear-gradient(to left, transparent 0, var(--light) 12px ,var(--light) 100%); } + +// adapted styles from bootstrap 5.3 + +.cb-overflow-x-auto { + overflow-x: auto; +} + +.cb-overflow-x-hidden { + overflow-x: hidden; +} +.cb-overflow-x-visible { + overflow-x: visible; +} + +.cb-overflow-x-scroll { + overflow-x: scroll; +} + +.cb-overflow-y-auto { + overflow-y: auto; +} + +.cb-overflow-y-hidden { + overflow-y: hidden; +} +.cb-overflow-y-visible { + overflow-y: visible; +} + +.cb-overflow-y-scroll { + overflow-y: scroll; +} diff --git a/services/app/apps/codebattle/assets/js/widgets/components/UserName.jsx b/services/app/apps/codebattle/assets/js/widgets/components/UserName.jsx index 93eeccc22..91a6538b9 100644 --- a/services/app/apps/codebattle/assets/js/widgets/components/UserName.jsx +++ b/services/app/apps/codebattle/assets/js/widgets/components/UserName.jsx @@ -46,7 +46,9 @@ const UserName = ({

animation { setModalShowing(false); }; @@ -150,8 +151,8 @@ function GameActionButtons({ Are you sure you want to give up? - - + + ); diff --git a/services/app/apps/codebattle/assets/js/widgets/pages/lobby/ChatActionModal.jsx b/services/app/apps/codebattle/assets/js/widgets/pages/lobby/ChatActionModal.jsx index e2d0e3d03..1efee36ad 100644 --- a/services/app/apps/codebattle/assets/js/widgets/pages/lobby/ChatActionModal.jsx +++ b/services/app/apps/codebattle/assets/js/widgets/pages/lobby/ChatActionModal.jsx @@ -31,7 +31,7 @@ function ChatActionModal({ dispatch( actions.showCreateGameInviteModal({ - opponentInfo: { id: userId, name: userName }, + opponentInfo: { id: Number(userId), name: userName }, }), ); }, [dispatch, setModalShowing]); @@ -41,7 +41,7 @@ function ChatActionModal({ const { userId, userName } = event.currentTarget.dataset; setModalShowing({ opened: false }); - dispatch(lobbyMiddlewares.openDirect(userId, userName)); + dispatch(lobbyMiddlewares.openDirect(Number(userId), userName)); if (chatInputRef.current) { chatInputRef.current.focus(); } diff --git a/services/app/apps/codebattle/assets/js/widgets/pages/lobby/LobbyWidget.jsx b/services/app/apps/codebattle/assets/js/widgets/pages/lobby/LobbyWidget.jsx index 5b2c0b722..ef389b8b2 100644 --- a/services/app/apps/codebattle/assets/js/widgets/pages/lobby/LobbyWidget.jsx +++ b/services/app/apps/codebattle/assets/js/widgets/pages/lobby/LobbyWidget.jsx @@ -384,7 +384,11 @@ const GameContainers = ({ return (