From e44720490dc9d635f234dfe64acff8c6186ad464 Mon Sep 17 00:00:00 2001 From: uo288543 Date: Wed, 24 Apr 2024 21:23:28 +0200 Subject: [PATCH 1/6] Add button to download apk --- webapp/src/components/Footer.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webapp/src/components/Footer.js b/webapp/src/components/Footer.js index db375b97..acf32254 100644 --- a/webapp/src/components/Footer.js +++ b/webapp/src/components/Footer.js @@ -1,6 +1,7 @@ import * as React from 'react'; import { AppBar, Toolbar, Typography, Link } from '@mui/material'; import { useTranslation } from 'react-i18next'; +import AndroidIcon from '@mui/icons-material/Android'; const Footer = () => { const { t } = useTranslation(); @@ -21,6 +22,16 @@ const Footer = () => { {t("Footer.api_users")} + + + ); From f1cd43b7772fa0f23b1815409d4e99ce01c6188e Mon Sep 17 00:00:00 2001 From: uo288543 Date: Wed, 24 Apr 2024 21:27:47 +0200 Subject: [PATCH 2/6] add other languages to the link text --- webapp/src/components/Footer.js | 2 +- webapp/src/localize/en.json | 3 ++- webapp/src/localize/es.json | 3 ++- webapp/src/localize/fr.json | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/webapp/src/components/Footer.js b/webapp/src/components/Footer.js index acf32254..164ff8fe 100644 --- a/webapp/src/components/Footer.js +++ b/webapp/src/components/Footer.js @@ -29,7 +29,7 @@ const Footer = () => { > diff --git a/webapp/src/localize/en.json b/webapp/src/localize/en.json index ad821a35..31d70acf 100644 --- a/webapp/src/localize/en.json +++ b/webapp/src/localize/en.json @@ -25,7 +25,8 @@ "Footer": { "api_questions": "QUESTIONS API DOC", - "api_users": "USERS API DOC" + "api_users": "USERS API DOC", + "apk_link": "Download for Android" }, "Games": { diff --git a/webapp/src/localize/es.json b/webapp/src/localize/es.json index 5b51732b..24cdd57a 100644 --- a/webapp/src/localize/es.json +++ b/webapp/src/localize/es.json @@ -25,7 +25,8 @@ "Footer": { "api_questions": "DOCUMENTACIÓN DE LA API DE PREGUNTAS", - "api_users": "DOCUMENTACIÓN DE LA API DE USUARIOS" + "api_users": "DOCUMENTACIÓN DE LA API DE USUARIOS", + "apk_link": "Descargar para Android" }, "Games": { diff --git a/webapp/src/localize/fr.json b/webapp/src/localize/fr.json index 6ae2d1e5..0f22bde9 100644 --- a/webapp/src/localize/fr.json +++ b/webapp/src/localize/fr.json @@ -25,7 +25,8 @@ "Footer": { "api_questions": "DOCUMENTATION DE L'API DES QUESTIONS", - "api_users": "DOCUMENTATION DE L'API DES UTILISATEURS" + "api_users": "DOCUMENTATION DE L'API DES UTILISATEURS", + "apk_link": "Télécharger pour Android" }, "Games": { From b849aff1a1243369a0659d580c50a1b83d7ae5c0 Mon Sep 17 00:00:00 2001 From: uo288543 Date: Thu, 25 Apr 2024 10:13:43 +0200 Subject: [PATCH 3/6] move icon to home and make examples --- webapp/src/components/Footer.js | 12 +-------- webapp/src/pages/Home.js | 44 +++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/webapp/src/components/Footer.js b/webapp/src/components/Footer.js index 164ff8fe..68ce0462 100644 --- a/webapp/src/components/Footer.js +++ b/webapp/src/components/Footer.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { AppBar, Toolbar, Typography, Link } from '@mui/material'; import { useTranslation } from 'react-i18next'; -import AndroidIcon from '@mui/icons-material/Android'; + const Footer = () => { const { t } = useTranslation(); @@ -22,16 +22,6 @@ const Footer = () => { {t("Footer.api_users")} - - - ); diff --git a/webapp/src/pages/Home.js b/webapp/src/pages/Home.js index fcfa9336..fb41bba4 100644 --- a/webapp/src/pages/Home.js +++ b/webapp/src/pages/Home.js @@ -2,6 +2,7 @@ import * as React from "react"; import {Box, Button} from "@mui/material"; import useMediaQuery from '@mui/material/useMediaQuery'; import { useTranslation } from 'react-i18next'; +import AndroidIcon from '@mui/icons-material/Android'; const Home = () => { const xxl = useMediaQuery('(min-width:1920px)'); @@ -102,6 +103,49 @@ const Home = () => { + + + + + + + + + + + ); }; From 7e7aba144a6bdd980e43e83b35637a46b47b973c Mon Sep 17 00:00:00 2001 From: uo288543 Date: Thu, 25 Apr 2024 10:28:17 +0200 Subject: [PATCH 4/6] add fav button --- webapp/src/pages/Home.js | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/webapp/src/pages/Home.js b/webapp/src/pages/Home.js index fb41bba4..d2447abb 100644 --- a/webapp/src/pages/Home.js +++ b/webapp/src/pages/Home.js @@ -1,5 +1,5 @@ import * as React from "react"; -import {Box, Button} from "@mui/material"; +import {Box, Button, Fab, useTheme } from "@mui/material"; import useMediaQuery from '@mui/material/useMediaQuery'; import { useTranslation } from 'react-i18next'; import AndroidIcon from '@mui/icons-material/Android'; @@ -7,6 +7,8 @@ import AndroidIcon from '@mui/icons-material/Android'; const Home = () => { const xxl = useMediaQuery('(min-width:1920px)'); const { t } = useTranslation(); + const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down('sm')); const styles = { logo:{ @@ -142,10 +144,40 @@ const Home = () => { color="primary" startIcon={} style={{ marginTop: '0.5em' }} + sx={{ + '&:hover': { + border: `2px solid #3DDC84`, + backgroundColor: 'primary.light', + }, + }} > {t("Footer.apk_link")} + + + + + + + + + ); }; From 7c29ba861d7f60b70857c77cae56a6aa1124403e Mon Sep 17 00:00:00 2001 From: uo288543 Date: Thu, 25 Apr 2024 11:32:14 +0200 Subject: [PATCH 5/6] Add tooltip --- webapp/src/pages/Home.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/webapp/src/pages/Home.js b/webapp/src/pages/Home.js index d2447abb..f56d30c1 100644 --- a/webapp/src/pages/Home.js +++ b/webapp/src/pages/Home.js @@ -1,5 +1,5 @@ import * as React from "react"; -import {Box, Button, Fab, useTheme } from "@mui/material"; +import {Box, Button, Fab, useTheme, Tooltip } from "@mui/material"; import useMediaQuery from '@mui/material/useMediaQuery'; import { useTranslation } from 'react-i18next'; import AndroidIcon from '@mui/icons-material/Android'; @@ -167,14 +167,16 @@ const Home = () => { target="_blank" rel="noopener noreferrer" > - - - + {/* TODO */} + + + + From d3af04c991f931ba13766714d7717d4d5ff69ce2 Mon Sep 17 00:00:00 2001 From: uo288543 Date: Sat, 27 Apr 2024 10:22:11 +0200 Subject: [PATCH 6/6] Update code to include only last rectangle button --- webapp/src/pages/Home.js | 61 ++++------------------------------------ 1 file changed, 5 insertions(+), 56 deletions(-) diff --git a/webapp/src/pages/Home.js b/webapp/src/pages/Home.js index f56d30c1..20eb7616 100644 --- a/webapp/src/pages/Home.js +++ b/webapp/src/pages/Home.js @@ -1,5 +1,5 @@ import * as React from "react"; -import {Box, Button, Fab, useTheme, Tooltip } from "@mui/material"; +import {Box, Button, useTheme } from "@mui/material"; import useMediaQuery from '@mui/material/useMediaQuery'; import { useTranslation } from 'react-i18next'; import AndroidIcon from '@mui/icons-material/Android'; @@ -105,45 +105,19 @@ const Home = () => { - - - - - - - + - - - - {/* TODO */} - - - - - - - ); };