From d68850f5fb1d764474c294bf127b96b93e1a9178 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Sat, 27 Apr 2024 19:21:03 +0200 Subject: [PATCH 01/15] Little renaming --- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/register/Register.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 2ec55073..284e39d9 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './Init.scss'; +import './init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index 26ef2e64..0d3e67d9 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './Register.scss'; +import './register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000' From 170aa19d38c00f5ceb2814c38950079db60d7221 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Sun, 28 Apr 2024 01:24:27 +0200 Subject: [PATCH 02/15] Error fixed in nav switch related to local storage --- webapp/src/App.tsx | 5 +++-- webapp/src/common/Nav.tsx | 12 +++++++----- webapp/src/components/login/Login.tsx | 2 -- webapp/src/components/register/Register.tsx | 2 -- webapp/src/pages/init/index.tsx | 2 -- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/webapp/src/App.tsx b/webapp/src/App.tsx index d344643a..1df673ad 100644 --- a/webapp/src/App.tsx +++ b/webapp/src/App.tsx @@ -10,8 +10,9 @@ function App() { const { i18n } = useTranslation(); React.useEffect(() => { - localStorage.setItem("lang", navigator.language); - i18n.changeLanguage(navigator.language); + localStorage.clear(); + localStorage.setItem("lang", navigator.language.slice(0, 2)); + i18n.changeLanguage(navigator.language.slice(0, 2)); }, [i18n]); diff --git a/webapp/src/common/Nav.tsx b/webapp/src/common/Nav.tsx index 67815981..960547c5 100644 --- a/webapp/src/common/Nav.tsx +++ b/webapp/src/common/Nav.tsx @@ -15,7 +15,6 @@ const NavBar: React.FC<{}> = () => const [anchorEl, setAnchorEl] = useState(null); const [open, setOpen] = useState(false); const [chevronRotated, setChevronRotated] = useState(true); - const [checked, setChecked] = useState(navigator.language==="es-ES"); const handleClick = (event: React.MouseEvent | React.MouseEvent) => { setAnchorEl(event.currentTarget); @@ -31,15 +30,13 @@ const NavBar: React.FC<{}> = () => const handleSwitch = () => { const language = localStorage.getItem("lang"); - if(language === "es" || language === null){ + if(language === "es"){ localStorage.setItem("lang", "en"); i18n.changeLanguage("en"); - setChecked(false); } else{ localStorage.setItem("lang", "es"); i18n.changeLanguage("es"); - setChecked(true) } }; @@ -168,7 +165,12 @@ const NavBar: React.FC<{}> = () => src={process.env.PUBLIC_URL + '/british-flag.png'} alt='British flag' /> - + {localStorage.getItem("lang") === 'en' && ( + + )} + {localStorage.getItem("lang") === 'es' && ( + + )} { async function loginUser () { try { - localStorage.clear(); const user = await axios.post(`${apiEndpoint}/login`, { username, password }); localStorage.setItem("username", user.data.username); @@ -38,7 +37,6 @@ const Login = (props: ActionProps) => { localStorage.setItem("isAuthenticated", JSON.stringify(true)); // Extract data from the response localStorage.setItem('userUUID', user.data.uuid); - localStorage.setItem('lang','en') setOpenSnackbar(true); navigate("/game") diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index ee4373fd..0a7047f0 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -25,7 +25,6 @@ const Register = (props:ActionProps) => { // checkear que el username no exista (tiene que ser unico) await axios.post(`${apiEndpoint}/adduser`, { username, password }); setOpenSnackbar(true); - localStorage.clear(); const user = await axios.post(`${apiEndpoint}/login`, { username, password }); console.log(user.data); @@ -36,7 +35,6 @@ const Register = (props:ActionProps) => { localStorage.setItem("isAuthenticated", JSON.stringify(true)); // Extract data from the response localStorage.setItem('userUUID', user.data.uuid); - localStorage.setItem('lang','en') setOpenSnackbar(true); navigate("/game") diff --git a/webapp/src/pages/init/index.tsx b/webapp/src/pages/init/index.tsx index b3d3c3dc..0fcb3c6a 100644 --- a/webapp/src/pages/init/index.tsx +++ b/webapp/src/pages/init/index.tsx @@ -29,8 +29,6 @@ export const InitPage: React.FC<{}> = () =>{ setShowGoogleLM(!showGoogleLM); setShowInit(!showInit); } */ - - localStorage.clear(); localStorage.setItem("isAuthenticated", JSON.stringify(false)); return ( From 7cdce7971e1db30dc1ffeedf43f6a555c2631a9e Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Sun, 28 Apr 2024 02:12:00 +0200 Subject: [PATCH 03/15] Create group lpcalized --- webapp/src/App.tsx | 2 -- .../components/group/GroupCreationModal.tsx | 6 +++--- webapp/src/i18n.ts | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/webapp/src/App.tsx b/webapp/src/App.tsx index 1df673ad..14183f87 100644 --- a/webapp/src/App.tsx +++ b/webapp/src/App.tsx @@ -10,11 +10,9 @@ function App() { const { i18n } = useTranslation(); React.useEffect(() => { - localStorage.clear(); localStorage.setItem("lang", navigator.language.slice(0, 2)); i18n.changeLanguage(navigator.language.slice(0, 2)); }, [i18n]); - return ( diff --git a/webapp/src/components/group/GroupCreationModal.tsx b/webapp/src/components/group/GroupCreationModal.tsx index 6571defa..4eaaeb10 100644 --- a/webapp/src/components/group/GroupCreationModal.tsx +++ b/webapp/src/components/group/GroupCreationModal.tsx @@ -58,7 +58,7 @@ export const CreationModal: FC = ({nowHasGroup, setError, toggleCre

{t('create_group_group_name')}

setGroupName(e.target.value)} /> @@ -71,8 +71,8 @@ export const CreationModal: FC = ({nowHasGroup, setError, toggleCre name="radio-buttons-group" onChange={(e) => setPublic(e.target.value === "yes")} > - } label="Yes" /> - } label="No" /> + } label={t('create_group_yes')} /> + } label={t('create_group_no')} /> diff --git a/webapp/src/i18n.ts b/webapp/src/i18n.ts index 9bc5a2d6..1ef28c84 100644 --- a/webapp/src/i18n.ts +++ b/webapp/src/i18n.ts @@ -79,6 +79,15 @@ i18n no_group_close: 'Close', no_group_join_group: 'Join group', no_group_join_blank: 'Join', + create_group_group_name: 'Group name:', + create_group_group_name_label: 'Group name', + create_group_public_group: 'Public group:', + create_group_yes: 'Yes', + create_group_no: 'No', + create_group_max_members: 'Max number of members:', + create_group_description: 'Description:', + create_group_description_label: 'Description', + create_group_button: 'Create Group', login_message: 'Login successful', register_message: 'You registered successfully', game_single_player: 'Single Player', @@ -171,6 +180,15 @@ i18n no_group_close: 'Cerrar', no_group_join_group: 'Unirse a grupo', no_group_join_blank: 'Unirse', + create_group_group_name: 'Nombre del grupo:', + create_group_group_name_label: 'Nombre del grupo', + create_group_public_group: 'Grupo público:', + create_group_yes: 'Sí', + create_group_no: 'No', + create_group_max_members: 'Máximo número de miembros:', + create_group_description: 'Descripción:', + create_group_description_label: 'Descripción', + create_group_button: 'Crear Grupo', login_message: 'Inicio de sesión exitoso', register_message: 'Registro exitoso', game_single_player: 'Un Solo Jugador', From 4c63761db6f26c33092edd0a25ae6e3dd7322f9f Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Sun, 28 Apr 2024 02:55:37 +0200 Subject: [PATCH 04/15] Styles improved for create group --- webapp/src/components/group/Group.scss | 1 + .../components/group/GroupCreationModal.tsx | 21 ++++++++++--------- webapp/src/i18n.ts | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/webapp/src/components/group/Group.scss b/webapp/src/components/group/Group.scss index 701081e2..4c7d0c63 100644 --- a/webapp/src/components/group/Group.scss +++ b/webapp/src/components/group/Group.scss @@ -36,6 +36,7 @@ } .modal { + width: 400px; background-color: white; padding: 20px; border-radius: 8px; diff --git a/webapp/src/components/group/GroupCreationModal.tsx b/webapp/src/components/group/GroupCreationModal.tsx index 4eaaeb10..b9dd503d 100644 --- a/webapp/src/components/group/GroupCreationModal.tsx +++ b/webapp/src/components/group/GroupCreationModal.tsx @@ -54,43 +54,44 @@ export const CreationModal: FC = ({nowHasGroup, setError, toggleCre - +

{t('create_group_group_name')}

- setGroupName(e.target.value)} />
- +

{t('create_group_public_group')}

- setPublic(e.target.value === "yes")} > } label={t('create_group_yes')} /> } label={t('create_group_no')} />
- -

{t('create_group_max_members')}

- + +

{t('create_group_max_members')}

+
- +

{t('create_group_description')}

setDescription(e.target.value)} />
- +
diff --git a/webapp/src/i18n.ts b/webapp/src/i18n.ts index 1ef28c84..64a4986e 100644 --- a/webapp/src/i18n.ts +++ b/webapp/src/i18n.ts @@ -84,7 +84,7 @@ i18n create_group_public_group: 'Public group:', create_group_yes: 'Yes', create_group_no: 'No', - create_group_max_members: 'Max number of members:', + create_group_max_members: 'Max nº of members:', create_group_description: 'Description:', create_group_description_label: 'Description', create_group_button: 'Create Group', @@ -185,7 +185,7 @@ i18n create_group_public_group: 'Grupo público:', create_group_yes: 'Sí', create_group_no: 'No', - create_group_max_members: 'Máximo número de miembros:', + create_group_max_members: 'Máx. nº de miembros:', create_group_description: 'Descripción:', create_group_description_label: 'Descripción', create_group_button: 'Crear Grupo', From 5c5ce8f0273eb3e0e6ff3ee832248bcf1d0c04a6 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Sun, 28 Apr 2024 03:03:35 +0200 Subject: [PATCH 05/15] Styles improved for group view --- webapp/src/components/group/GroupTable.tsx | 18 +++++++++--------- webapp/src/components/group/NoGroup.tsx | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webapp/src/components/group/GroupTable.tsx b/webapp/src/components/group/GroupTable.tsx index 4ac519a0..470b9ea0 100644 --- a/webapp/src/components/group/GroupTable.tsx +++ b/webapp/src/components/group/GroupTable.tsx @@ -73,18 +73,18 @@ export const GroupTable = (props: TableProps) => { {loading ? : ( - - -

{groupName}

+ + +

{groupName}

- -

{total}{t('group_table_points')}

+ +

{total}{t('group_table_points')}

- -

{numberMembers}{t('group_table_members')}

+ +

{numberMembers}{t('group_table_members')}

- - + + diff --git a/webapp/src/components/group/NoGroup.tsx b/webapp/src/components/group/NoGroup.tsx index a04a7bc2..dc77b0ac 100644 --- a/webapp/src/components/group/NoGroup.tsx +++ b/webapp/src/components/group/NoGroup.tsx @@ -135,7 +135,7 @@ const NoGroup = (props: ActionProps) =>
))} - +
From c2ad466786fe959a99245b4ae3f8af1027ca0c42 Mon Sep 17 00:00:00 2001 From: CarolinaUniovi Date: Sun, 28 Apr 2024 18:22:59 +0200 Subject: [PATCH 06/15] All test passing --- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/login/Login.test.js | 64 +++++++++++---------- webapp/src/components/login/Login.tsx | 2 + webapp/src/components/register/Register.tsx | 2 +- 4 files changed, 37 insertions(+), 33 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 30295a49..8f99622a 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './init.scss'; +import './Init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/login/Login.test.js b/webapp/src/components/login/Login.test.js index 22272c62..04abe8a5 100644 --- a/webapp/src/components/login/Login.test.js +++ b/webapp/src/components/login/Login.test.js @@ -13,7 +13,7 @@ describe('Login component', () => { mockAxios.reset(); }); - it('should login user successfully', async () => { + it('should handle error when logging in user', async () => { render( {}} /> @@ -24,13 +24,8 @@ describe('Login component', () => { const passwordInput = screen.getByLabelText(/Password/i); const loginButton = screen.getByRole('button', { name: /login/i }); - // Mock the axios.post request to simulate a successful response - mockAxios.onPost('http://localhost:8000/login').reply(200, { - username: 'testUser', - totalScore: 100, - nWins: 5, - uuid: '123456789' - }); + // Mock the axios.post request to simulate an error response + mockAxios.onPost('http://localhost:8000/login').reply(500, { error: 'Internal Server Error' }); // Simulate user input fireEvent.change(usernameInput, { target: { value: 'testUser' } }); @@ -39,22 +34,22 @@ describe('Login component', () => { // Trigger the login button click fireEvent.click(loginButton); - // Wait for the Snackbar to be open + // Wait for the error Snackbar to be open await waitFor(() => { - expect(screen.getByTestId("login-successfull-snackbar")).toBeInTheDocument(); + expect(screen.getByTestId('login-error-snackbar')).toBeInTheDocument(); }); - // Verify local storage is set correctly - expect(localStorage.getItem('username')).toBe('testUser'); - expect(localStorage.getItem('score')).toBe('100'); - expect(localStorage.getItem('nWins')).toBe('5'); - expect(localStorage.getItem('uuid')).toBe('123456789'); - expect(localStorage.getItem('isAuthenticated')).toBe('true'); - expect(localStorage.getItem('userUUID')).toBe('123456789'); - expect(localStorage.getItem('lang')).toBe('en'); + // Verify local storage is not set when there's an error + expect(localStorage.getItem('username')).toBeNull(); + expect(localStorage.getItem('score')).toBeNull(); + expect(localStorage.getItem('nWins')).toBeNull(); + expect(localStorage.getItem('uuid')).toBeNull(); + expect(localStorage.getItem('isAuthenticated')).toBeNull(); + expect(localStorage.getItem('userUUID')).toBeNull(); + expect(localStorage.getItem('lang')).toBeNull(); }); - it('should handle error when logging in user', async () => { + it('should login user successfully', async () => { render( {}} /> @@ -65,8 +60,13 @@ describe('Login component', () => { const passwordInput = screen.getByLabelText(/Password/i); const loginButton = screen.getByRole('button', { name: /login/i }); - // Mock the axios.post request to simulate an error response - mockAxios.onPost('http://localhost:8000/login').reply(500, { error: 'Internal Server Error' }); + // Mock the axios.post request to simulate a successful response + mockAxios.onPost('http://localhost:8000/login').reply(200, { + username: 'testUser', + totalScore: 100, + nWins: 5, + uuid: '123456789' + }); // Simulate user input fireEvent.change(usernameInput, { target: { value: 'testUser' } }); @@ -75,18 +75,20 @@ describe('Login component', () => { // Trigger the login button click fireEvent.click(loginButton); - // Wait for the error Snackbar to be open + // Wait for the Snackbar to be open await waitFor(() => { - expect(screen.getByTestId('login-error-snackbar')).toBeInTheDocument(); + expect(screen.getByTestId("login-successfull-snackbar")).toBeInTheDocument(); }); - // Verify local storage is not set when there's an error - expect(localStorage.getItem('username')).toBeNull(); - expect(localStorage.getItem('score')).toBeNull(); - expect(localStorage.getItem('nWins')).toBeNull(); - expect(localStorage.getItem('uuid')).toBeNull(); - expect(localStorage.getItem('isAuthenticated')).toBeNull(); - expect(localStorage.getItem('userUUID')).toBeNull(); - expect(localStorage.getItem('lang')).toBeNull(); + // Verify local storage is set correctly + expect(localStorage.getItem('username')).toBe('testUser'); + expect(localStorage.getItem('score')).toBe('100'); + expect(localStorage.getItem('nWins')).toBe('5'); + expect(localStorage.getItem('uuid')).toBe('123456789'); + expect(localStorage.getItem('isAuthenticated')).toBe('true'); + expect(localStorage.getItem('userUUID')).toBe('123456789'); + expect(localStorage.getItem('lang')).toBe('en'); }); + + }); \ No newline at end of file diff --git a/webapp/src/components/login/Login.tsx b/webapp/src/components/login/Login.tsx index 29c3fbec..e60d82de 100644 --- a/webapp/src/components/login/Login.tsx +++ b/webapp/src/components/login/Login.tsx @@ -29,6 +29,7 @@ const Login = (props: ActionProps) => { try { const user = await axios.post(`${apiEndpoint}/login`, { username, password }); + console.log(user.data); localStorage.setItem("username", user.data.username); localStorage.setItem("score", user.data.totalScore); @@ -37,6 +38,7 @@ const Login = (props: ActionProps) => { localStorage.setItem("isAuthenticated", JSON.stringify(true)); // Extract data from the response localStorage.setItem('userUUID', user.data.uuid); + localStorage.setItem("lang", navigator.language.slice(0, 2)); setOpenSnackbar(true); navigate("/game") diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index 0a7047f0..0b700308 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './register.scss'; +import './Register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000' From 38f5d537572204cade321047bb2f4d6ce830e894 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 02:15:51 +0200 Subject: [PATCH 07/15] Renaming scss references --- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/register/Register.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 8f99622a..30295a49 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './Init.scss'; +import './init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index 0b700308..0a7047f0 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './Register.scss'; +import './register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000' From 1a2a91efafda67c2fff59722b13e512eaaef73d3 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 02:44:42 +0200 Subject: [PATCH 08/15] Some resizing --- webapp/src/components/group/GroupCreationModal.tsx | 2 +- webapp/src/pages/userProfile/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/components/group/GroupCreationModal.tsx b/webapp/src/components/group/GroupCreationModal.tsx index b9dd503d..0e8a677e 100644 --- a/webapp/src/components/group/GroupCreationModal.tsx +++ b/webapp/src/components/group/GroupCreationModal.tsx @@ -82,7 +82,7 @@ export const CreationModal: FC = ({nowHasGroup, setError, toggleCre

{t('create_group_description')}

- { }; return ( - + {profileInfo && ( @@ -124,7 +124,7 @@ const ProfilePage = () => { > {t('profile_questions')} -
    +
      {profileInfo.lastGame.map((question, index) => (
    • Date: Mon, 29 Apr 2024 02:52:50 +0200 Subject: [PATCH 09/15] New button styles for initial views --- webapp/src/components/init/Init.tsx | 15 +++++++++++++-- webapp/src/components/login/Login.tsx | 7 ++++--- webapp/src/components/register/Register.tsx | 7 ++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 30295a49..6bcb7eee 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -20,10 +20,21 @@ const Init = (props:ActionProps) =>{ return ( - - diff --git a/webapp/src/components/login/Login.tsx b/webapp/src/components/login/Login.tsx index e60d82de..8c353fed 100644 --- a/webapp/src/components/login/Login.tsx +++ b/webapp/src/components/login/Login.tsx @@ -78,12 +78,13 @@ const Login = (props: ActionProps) => { value={password} onChange={(e) => setPassword(e.target.value)} onKeyDown={handleKeyPress} + sx={{ marginBottom: '30px' }} /> - - - diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index 0a7047f0..aa059230 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -86,12 +86,13 @@ const Register = (props:ActionProps) => { value={password} onChange={(e) => setPassword(e.target.value)} onKeyDown={handleKeyPress} + sx={{ marginBottom: '30px' }} /> - - - From 062b70f608d77938cc12c45661b194d43701bda2 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 03:10:22 +0200 Subject: [PATCH 10/15] Fixed problem in gamemode buttons --- webapp/src/pages/game/game-page.scss | 4 ++++ webapp/src/pages/game/index.tsx | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webapp/src/pages/game/game-page.scss b/webapp/src/pages/game/game-page.scss index fa3c27b0..299ed858 100644 --- a/webapp/src/pages/game/game-page.scss +++ b/webapp/src/pages/game/game-page.scss @@ -7,6 +7,10 @@ } .game-page-button { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; width: 290px; font-size: 1.5em; padding: 15px 30px; diff --git a/webapp/src/pages/game/index.tsx b/webapp/src/pages/game/index.tsx index c3520e4d..e0fa0a02 100644 --- a/webapp/src/pages/game/index.tsx +++ b/webapp/src/pages/game/index.tsx @@ -9,12 +9,8 @@ export const GamePage: React.FC<{}> = () => { return (
      - - + {t('game_single_player')} + {t('game_multiplayer')}
      ); }; \ No newline at end of file From 97221215eb5e188f9ea42ad7f3007f34f9856975 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 03:44:20 +0200 Subject: [PATCH 11/15] Smoother overflow in navbar --- webapp/src/common/Nav.tsx | 4 ++-- webapp/src/common/nav.scss | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/webapp/src/common/Nav.tsx b/webapp/src/common/Nav.tsx index 960547c5..977e158a 100644 --- a/webapp/src/common/Nav.tsx +++ b/webapp/src/common/Nav.tsx @@ -64,8 +64,7 @@ const NavBar: React.FC<{}> = () => = () => Date: Mon, 29 Apr 2024 03:45:08 +0200 Subject: [PATCH 12/15] Problem with logo height --- webapp/src/common/nav.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/common/nav.scss b/webapp/src/common/nav.scss index c3e5768f..9669fa7e 100644 --- a/webapp/src/common/nav.scss +++ b/webapp/src/common/nav.scss @@ -25,7 +25,7 @@ overflow: hidden; display: flex; flex-wrap: nowrap; - height: 40px; + height: 42px; font-weight: 500; font-size: xx-large; margin-right: 15px !important; From c6483bfae752b1adf85765d4c30a6306a363b8c9 Mon Sep 17 00:00:00 2001 From: CarolinaUniovi Date: Mon, 29 Apr 2024 08:48:09 +0200 Subject: [PATCH 13/15] tests pass --- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/register/Register.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 6bcb7eee..6e4f17c1 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './init.scss'; +import './Init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index aa059230..889ffcbd 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './register.scss'; +import './Register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000' From 56af77f43ee5e4aaf1b51baa1620dd63a77bbd21 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 11:40:28 +0200 Subject: [PATCH 14/15] Solving renaming errors and resizing number input at create group --- webapp/src/components/group/GroupCreationModal.tsx | 2 +- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/register/Register.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/src/components/group/GroupCreationModal.tsx b/webapp/src/components/group/GroupCreationModal.tsx index 0e8a677e..564112cf 100644 --- a/webapp/src/components/group/GroupCreationModal.tsx +++ b/webapp/src/components/group/GroupCreationModal.tsx @@ -78,7 +78,7 @@ export const CreationModal: FC = ({nowHasGroup, setError, toggleCre

      {t('create_group_max_members')}

      - +

      {t('create_group_description')}

      diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 6e4f17c1..6bcb7eee 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './Init.scss'; +import './init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index 889ffcbd..aa059230 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './Register.scss'; +import './register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000' From 5f935fb466e9f3c55901f8c68e28a2c8fc997c26 Mon Sep 17 00:00:00 2001 From: AlvaroIC Date: Mon, 29 Apr 2024 11:44:37 +0200 Subject: [PATCH 15/15] Backtracking some changes --- webapp/src/components/init/Init.tsx | 2 +- webapp/src/components/register/Register.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/init/Init.tsx b/webapp/src/components/init/Init.tsx index 6bcb7eee..6e4f17c1 100644 --- a/webapp/src/components/init/Init.tsx +++ b/webapp/src/components/init/Init.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import {Button, Stack} from "@mui/material"; import GLoginButton from '../g-login-button/GLoginButton'; -import './init.scss'; +import './Init.scss'; type ActionProps = { changeView:(arg:boolean)=> void; diff --git a/webapp/src/components/register/Register.tsx b/webapp/src/components/register/Register.tsx index aa059230..889ffcbd 100644 --- a/webapp/src/components/register/Register.tsx +++ b/webapp/src/components/register/Register.tsx @@ -2,7 +2,7 @@ import { useState, KeyboardEvent } from 'react'; import axios from 'axios'; import { Container, Typography, TextField, Snackbar, Stack, Button } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import './register.scss'; +import './Register.scss'; import { useNavigate } from "react-router-dom"; //const apiEndpoint = 'http://conoceryvencer.xyz:8000'