diff --git a/src/components/Game/GameOver.tsx b/src/components/Game/GameOver.tsx index f7fd24c..94aebb8 100644 --- a/src/components/Game/GameOver.tsx +++ b/src/components/Game/GameOver.tsx @@ -5,14 +5,12 @@ import Leaderboard from "../Leaderboard/Leaderboard" const GameOver = () => { return ( - + Game Over - - - + diff --git a/src/components/Game/GameWrapper.tsx b/src/components/Game/GameWrapper.tsx index 65bc848..4f6580b 100644 --- a/src/components/Game/GameWrapper.tsx +++ b/src/components/Game/GameWrapper.tsx @@ -19,10 +19,7 @@ const GameWrapper = () => { - + {!iamSpectator ? : null} diff --git a/src/components/Game/ThrowCardsWarningModal.tsx b/src/components/Game/ThrowCardsWarningModal.tsx index 17e0fe7..cbe65dd 100644 --- a/src/components/Game/ThrowCardsWarningModal.tsx +++ b/src/components/Game/ThrowCardsWarningModal.tsx @@ -51,12 +51,7 @@ const ThrowCardsWarningModal: React.FC = ({ - + {cards.map(card => ( { return ( - + My Stats {!!stats && stats.length > 0 ? ( diff --git a/src/components/Leaderboard/DoublesLeaderboard.tsx b/src/components/Leaderboard/DoublesLeaderboard.tsx index 283e30c..7980f3d 100644 --- a/src/components/Leaderboard/DoublesLeaderboard.tsx +++ b/src/components/Leaderboard/DoublesLeaderboard.tsx @@ -7,6 +7,7 @@ import { getPlayerProfiles } from "../../caches/PlayerProfilesSlice" import { GameStatus } from "../../model/Game" import { compareScore, compareTeamIds } from "../../utils/PlayerUtils" import { Player, Team } from "../../model/Player" +import { customStyles } from "../Tables/CustomStyles" const DoublesLeaderboard = () => { const game = useAppSelector(getGame) @@ -196,7 +197,9 @@ const DoublesLeaderboard = () => { data={teams} columns={columns} highlightOnHover - defaultSortFieldId="score" + customStyles={customStyles} + defaultSortFieldId={3} + defaultSortAsc={false} /> ) diff --git a/src/components/Leaderboard/LeaderboardModal.tsx b/src/components/Leaderboard/LeaderboardModal.tsx index 588a1ff..08b8cb1 100644 --- a/src/components/Leaderboard/LeaderboardModal.tsx +++ b/src/components/Leaderboard/LeaderboardModal.tsx @@ -1,6 +1,14 @@ import { useCallback, useState } from "react" -import { Modal, ModalBody, Button } from "reactstrap" +import { + Modal, + ModalBody, + Button, + CardGroup, + Card, + CardHeader, + CardBody, +} from "reactstrap" import Leaderboard from "../Leaderboard/Leaderboard" @@ -31,7 +39,14 @@ const LeaderboardModal = () => { toggle={toggleLeaderboardModal} isOpen={modalLeaderboard}> - + + + Leaderboard + + + + + > diff --git a/src/components/Leaderboard/SinglesLeaderboard.tsx b/src/components/Leaderboard/SinglesLeaderboard.tsx index 1b2ff96..3c61faa 100644 --- a/src/components/Leaderboard/SinglesLeaderboard.tsx +++ b/src/components/Leaderboard/SinglesLeaderboard.tsx @@ -6,6 +6,7 @@ import { useAppSelector } from "../../caches/hooks" import { getPlayerProfiles } from "../../caches/PlayerProfilesSlice" import { GameStatus } from "../../model/Game" import { Player } from "../../model/Player" +import { customStyles } from "../Tables/CustomStyles" interface LeaderboardItem { previousCard?: string @@ -129,7 +130,9 @@ const SinglesLeaderboard = () => { data={leaderboardData} columns={columns} highlightOnHover - defaultSortFieldId="score" + customStyles={customStyles} + defaultSortFieldId={3} + defaultSortAsc={false} /> ) diff --git a/src/components/MyGames/MyGames.tsx b/src/components/MyGames/MyGames.tsx index d04bf59..e68e9e9 100644 --- a/src/components/MyGames/MyGames.tsx +++ b/src/components/MyGames/MyGames.tsx @@ -25,6 +25,7 @@ import { getMyGames } from "../../caches/MyGamesSlice" import { getMyProfile } from "../../caches/MyProfileSlice" import { useSnackbar } from "notistack" import { Game, GameStatus } from "../../model/Game" +import { customStyles } from "../Tables/CustomStyles" const MyGames = () => { const dispatch = useAppDispatch() @@ -143,7 +144,7 @@ const MyGames = () => { return ( - + Games { theme="solarized" data={myGames} columns={columns} - defaultSortFieldId="timestamp" + customStyles={customStyles} + defaultSortFieldId={3} defaultSortAsc={false} highlightOnHover /> diff --git a/src/components/StartNewGame/StartNewGame.tsx b/src/components/StartNewGame/StartNewGame.tsx index 2a201bb..90148c0 100644 --- a/src/components/StartNewGame/StartNewGame.tsx +++ b/src/components/StartNewGame/StartNewGame.tsx @@ -14,11 +14,13 @@ import { Card, CardBody, CardGroup, + CardHeader, } from "reactstrap" import { useAppDispatch, useAppSelector } from "../../caches/hooks" import { PlayerProfile } from "../../model/Player" import { useSnackbar } from "notistack" +import { customStyles } from "../Tables/CustomStyles" const StartNewGame = () => { const dispatch = useAppDispatch() @@ -96,14 +98,10 @@ const StartNewGame = () => { return ( - - - Start a new game - + + Start a new game - Players - { columns={columns} highlightOnHover selectableRows + customStyles={customStyles} onSelectedRowsChange={togglePlayer} /> diff --git a/src/components/Tables/CustomStyles.ts b/src/components/Tables/CustomStyles.ts new file mode 100644 index 0000000..bc0c726 --- /dev/null +++ b/src/components/Tables/CustomStyles.ts @@ -0,0 +1,26 @@ +export const customStyles = { + headRow: { + style: { + border: "none", + }, + }, + headCells: { + style: { + color: "#202124", + fontSize: "14px", + }, + }, + rows: { + highlightOnHoverStyle: { + backgroundColor: "rgb(230, 244, 244)", + borderBottomColor: "#FFFFFF", + borderRadius: "25px", + outline: "1px solid #FFFFFF", + }, + }, + pagination: { + style: { + border: "none", + }, + }, +} diff --git a/src/pages/Game/_game.scss b/src/pages/Game/_game.scss index 52d8021..643a4d0 100644 --- a/src/pages/Game/_game.scss +++ b/src/pages/Game/_game.scss @@ -2,6 +2,10 @@ font-family: $fontFamily; } +.card { + --cui-card-bg: ; +} + .cardNotSelected { opacity: 0.9; filter: brightness(70%); @@ -11,11 +15,6 @@ filter: drop-shadow(16px 16px 20px red); } -.tableCloth { - background-image: url("/assets/img/cloth.jpg"); - min-height: 350px; -} - // .carpet { // background-image: url("/assets/img/carpet2.jpg"); // } diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 7cdfce5..f17f6cf 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from "react" +import React, { useEffect } from "react" import { Card, CardGroup, CardHeader } from "reactstrap" @@ -14,6 +14,7 @@ import GameService from "../../services/GameService" import { useSnackbar } from "notistack" import StatsService from "../../services/StatsService" import Loading from "../../components/icons/Loading" +import { Divider } from "@mui/material" const Home = () => { const dispatch = useAppDispatch() @@ -44,7 +45,7 @@ const Home = () => { {!myProfile.isPlayer && !myProfile.isAdmin ? ( - + You are successfully logged in but don't yet have any access permissions. Please @@ -55,16 +56,18 @@ const Home = () => { ) : ( {myProfile.isPlayer ? ( - + <> + + + - - ) : null} - {myProfile.isAdmin ? ( - - - + + + + > ) : null} + {myProfile.isAdmin ? : null} )} diff --git a/src/pages/Home/_home.scss b/src/pages/Home/_home.scss index 819a9a1..1cd24e6 100644 --- a/src/pages/Home/_home.scss +++ b/src/pages/Home/_home.scss @@ -2,25 +2,24 @@ font-family: $fontFamily; } .app_body { - background-color: $white; width: auto; flex: 1; position: relative; font-family: $fontFamily; } -.card-group { - padding-top: 10px; - padding-bottom: 10px; +.data-card { + background-color: $white; + opacity: 0.95; } + .game_wrap { min-width: 650px; overflow: overlay; margin-left: auto; margin-right: auto; text-align: center; - background-color: $white; } .game_container { @@ -545,6 +544,5 @@ @media (max-width: 277px) { .app { position: absolute; - background: $white; } } diff --git a/src/scss/_custom.scss b/src/scss/_custom.scss index ba4954c..be36221 100644 --- a/src/scss/_custom.scss +++ b/src/scss/_custom.scss @@ -8,7 +8,8 @@ body { // Here you can add other styles .main_content { - background-color: $white; + background-image: url("/assets/img/cloth.jpg"); + min-height: 800px; position: fixed; width: 100%; height: 100vh;