commit
a204ed0cd9
@ -25,6 +25,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.6",
|
||||
"@parcel/transformer-svg-react": "^2.6.2",
|
||||
"@types/react": "^17.0.11",
|
||||
"@types/react-dom": "^17.0.8",
|
||||
"parcel": "^2.6.2",
|
||||
|
||||
@ -7,6 +7,8 @@ import { getColorByBrightness } from "../util/ColorUtil";
|
||||
import Button from "./Button";
|
||||
import "@szhsin/react-menu/dist/index.css";
|
||||
import "@szhsin/react-menu/dist/transitions/slide.css";
|
||||
//@ts-ignore
|
||||
import MancalaIcon from "jsx:../mancala.svg";
|
||||
|
||||
function renderNewGameButton(
|
||||
context: Context,
|
||||
@ -52,9 +54,14 @@ const HeaderBar: FunctionComponent<{
|
||||
);
|
||||
return (
|
||||
<div style={{ background: context.themeManager.theme.appBarBgColor }} className="header-bar">
|
||||
<h1 style={{ color: textColor }} className="header-bar-title">
|
||||
{context.texts.Mancala}
|
||||
</h1>
|
||||
<div className="header-bar-left-panel">
|
||||
<div className="header-bar-icon-wrapper">
|
||||
<MancalaIcon className="header-bar-icon" style={{ height: "30px", width: "30px" }} />
|
||||
</div>
|
||||
<h1 style={{ color: textColor }} className="header-bar-title">
|
||||
{context.texts.Mancala}
|
||||
</h1>
|
||||
</div>
|
||||
<div className="header-bar-right-panel">
|
||||
<ThemeSwitchMenu context={context} textColor={textColor} />
|
||||
{renderNewGameButton(context, game, onNewGameClick, userKeyWhoLeave, crashMessage)}
|
||||
@ -87,6 +94,18 @@ const HeaderBar: FunctionComponent<{
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.header-bar-left-panel {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.header-bar-icon-wrapper {
|
||||
margin-right: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
`}</style>
|
||||
</div>)
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Mancala</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="mancala.svg">
|
||||
</head>
|
||||
<body style="margin: 0px;">
|
||||
<div id="main" style="display: flex;"></div>
|
||||
|
||||
76
src/mancala.svg
Normal file
76
src/mancala.svg
Normal file
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="100.00002mm"
|
||||
height="100.00001mm"
|
||||
viewBox="0 0 100.00002 100.00001"
|
||||
version="1.1"
|
||||
id="svg316"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview318"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs313" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-230.50606,-73.754324)">
|
||||
<rect
|
||||
style="fill:#b3b3b3;stroke-width:1.03151"
|
||||
id="rect489-5-7-8"
|
||||
width="100"
|
||||
height="100"
|
||||
x="230.50607"
|
||||
y="73.754326"
|
||||
ry="27.328773"
|
||||
inkscape:export-filename="mancala-icon.svg"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<rect
|
||||
style="fill:#a64b2a;fill-opacity:1;stroke-width:0.747434"
|
||||
id="rect642-6-2-0-7"
|
||||
width="35"
|
||||
height="35"
|
||||
x="281.50607"
|
||||
y="87.754311"
|
||||
ry="17.5" />
|
||||
<rect
|
||||
style="fill:#b3b3b3;stroke-width:0.747434"
|
||||
id="rect642-6-7-9-9-9"
|
||||
width="35"
|
||||
height="35"
|
||||
x="244.50607"
|
||||
y="87.754311"
|
||||
ry="17.5" />
|
||||
<rect
|
||||
style="fill:#a64b2a;fill-opacity:1;stroke:none;stroke-width:0.747434;stroke-opacity:1"
|
||||
id="rect642-6-2-1-3-2"
|
||||
width="35"
|
||||
height="35"
|
||||
x="281.50607"
|
||||
y="124.75433"
|
||||
ry="17.5" />
|
||||
<rect
|
||||
style="fill:#a64b2a;fill-opacity:1;stroke-width:1.05044"
|
||||
id="rect1550-0"
|
||||
width="35"
|
||||
height="70"
|
||||
x="244.50607"
|
||||
y="87.754311"
|
||||
ry="17.5" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
122
yarn.lock
122
yarn.lock
@ -29,7 +29,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d"
|
||||
integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==
|
||||
|
||||
"@babel/core@^7.18.6":
|
||||
"@babel/core@^7.15.5", "@babel/core@^7.18.6":
|
||||
version "7.18.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d"
|
||||
integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==
|
||||
@ -196,7 +196,7 @@
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8":
|
||||
"@babel/types@^7.15.6", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8":
|
||||
version "7.18.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f"
|
||||
integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==
|
||||
@ -892,6 +892,17 @@
|
||||
"@parcel/utils" "2.6.2"
|
||||
react-refresh "^0.9.0"
|
||||
|
||||
"@parcel/transformer-svg-react@^2.6.2":
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/transformer-svg-react/-/transformer-svg-react-2.6.2.tgz#06ceb15fbf9c0912fff439f9c004064c16563349"
|
||||
integrity sha512-Co4JDzLsQrZBpiJD8peszEJVAl6AjqGEknAxf7EVV79YlywUW+AUjE2b8vn443aJD19psDH3CRGr+H2yKkgJvg==
|
||||
dependencies:
|
||||
"@parcel/plugin" "2.6.2"
|
||||
"@svgr/core" "^6.2.0"
|
||||
"@svgr/plugin-jsx" "^6.2.0"
|
||||
"@svgr/plugin-svgo" "^6.2.0"
|
||||
camelcase "^6.3.0"
|
||||
|
||||
"@parcel/transformer-svg@2.6.2":
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/transformer-svg/-/transformer-svg-2.6.2.tgz#62795cfbc5ea083d0bd825d77ff0df3b717f05f9"
|
||||
@ -952,6 +963,96 @@
|
||||
chrome-trace-event "^1.0.2"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@svgr/babel-plugin-add-jsx-attribute@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz#bd6d1ff32a31b82b601e73672a789cc41e84fe18"
|
||||
integrity sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==
|
||||
|
||||
"@svgr/babel-plugin-remove-jsx-attribute@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz#58654908beebfa069681a83332544b17e5237e89"
|
||||
integrity sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==
|
||||
|
||||
"@svgr/babel-plugin-remove-jsx-empty-expression@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz#d06dd6e8a8f603f92f9979bb9990a1f85a4f57ba"
|
||||
integrity sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==
|
||||
|
||||
"@svgr/babel-plugin-replace-jsx-attribute-value@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz#0b85837577b02c31c09c758a12932820f5245cee"
|
||||
integrity sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==
|
||||
|
||||
"@svgr/babel-plugin-svg-dynamic-title@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz#28236ec26f7ab9d486a487d36ae52d58ba15676f"
|
||||
integrity sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==
|
||||
|
||||
"@svgr/babel-plugin-svg-em-dimensions@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz#40267c5dea1b43c4f83a0eb6169e08b43d8bafce"
|
||||
integrity sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==
|
||||
|
||||
"@svgr/babel-plugin-transform-react-native-svg@^6.0.0":
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz#eb688d0a5f539e34d268d8a516e81f5d7fede7c9"
|
||||
integrity sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==
|
||||
|
||||
"@svgr/babel-plugin-transform-svg-component@^6.2.0":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz#7ba61d9fc1fb42b0ba1a04e4630019fa7e993c4f"
|
||||
integrity sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg==
|
||||
|
||||
"@svgr/babel-preset@^6.2.0":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-6.2.0.tgz#1d3ad8c7664253a4be8e4a0f0e6872f30d8af627"
|
||||
integrity sha512-4WQNY0J71JIaL03DRn0vLiz87JXx0b9dYm2aA8XHlQJQoixMl4r/soYHm8dsaJZ3jWtkCiOYy48dp9izvXhDkQ==
|
||||
dependencies:
|
||||
"@svgr/babel-plugin-add-jsx-attribute" "^6.0.0"
|
||||
"@svgr/babel-plugin-remove-jsx-attribute" "^6.0.0"
|
||||
"@svgr/babel-plugin-remove-jsx-empty-expression" "^6.0.0"
|
||||
"@svgr/babel-plugin-replace-jsx-attribute-value" "^6.0.0"
|
||||
"@svgr/babel-plugin-svg-dynamic-title" "^6.0.0"
|
||||
"@svgr/babel-plugin-svg-em-dimensions" "^6.0.0"
|
||||
"@svgr/babel-plugin-transform-react-native-svg" "^6.0.0"
|
||||
"@svgr/babel-plugin-transform-svg-component" "^6.2.0"
|
||||
|
||||
"@svgr/core@^6.2.0":
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/core/-/core-6.2.1.tgz#195de807a9f27f9e0e0d678e01084b05c54fdf61"
|
||||
integrity sha512-NWufjGI2WUyrg46mKuySfviEJ6IxHUOm/8a3Ph38VCWSp+83HBraCQrpEM3F3dB6LBs5x8OElS8h3C0oOJaJAA==
|
||||
dependencies:
|
||||
"@svgr/plugin-jsx" "^6.2.1"
|
||||
camelcase "^6.2.0"
|
||||
cosmiconfig "^7.0.1"
|
||||
|
||||
"@svgr/hast-util-to-babel-ast@^6.2.1":
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.2.1.tgz#ae065567b74cbe745afae617053adf9a764bea25"
|
||||
integrity sha512-pt7MMkQFDlWJVy9ULJ1h+hZBDGFfSCwlBNW1HkLnVi7jUhyEXUaGYWi1x6bM2IXuAR9l265khBT4Av4lPmaNLQ==
|
||||
dependencies:
|
||||
"@babel/types" "^7.15.6"
|
||||
entities "^3.0.1"
|
||||
|
||||
"@svgr/plugin-jsx@^6.2.0", "@svgr/plugin-jsx@^6.2.1":
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-6.2.1.tgz#5668f1d2aa18c2f1bb7a1fc9f682d3f9aed263bd"
|
||||
integrity sha512-u+MpjTsLaKo6r3pHeeSVsh9hmGRag2L7VzApWIaS8imNguqoUwDq/u6U/NDmYs/KAsrmtBjOEaAAPbwNGXXp1g==
|
||||
dependencies:
|
||||
"@babel/core" "^7.15.5"
|
||||
"@svgr/babel-preset" "^6.2.0"
|
||||
"@svgr/hast-util-to-babel-ast" "^6.2.1"
|
||||
svg-parser "^2.0.2"
|
||||
|
||||
"@svgr/plugin-svgo@^6.2.0":
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@svgr/plugin-svgo/-/plugin-svgo-6.2.0.tgz#4cbe6a33ccccdcae4e3b63ded64cc1cbe1faf48c"
|
||||
integrity sha512-oDdMQONKOJEbuKwuy4Np6VdV6qoaLLvoY86hjvQEgU82Vx1MSWRyYms6Sl0f+NtqxLI/rDVufATbP/ev996k3Q==
|
||||
dependencies:
|
||||
cosmiconfig "^7.0.1"
|
||||
deepmerge "^4.2.2"
|
||||
svgo "^2.5.0"
|
||||
|
||||
"@swc/helpers@^0.4.2":
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.3.tgz#16593dfc248c53b699d4b5026040f88ddb497012"
|
||||
@ -1089,6 +1190,11 @@ callsites@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
|
||||
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
|
||||
|
||||
camelcase@^6.2.0, camelcase@^6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
|
||||
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
|
||||
|
||||
caniuse-lite@^1.0.30001332:
|
||||
version "1.0.30001335"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz"
|
||||
@ -1221,6 +1327,11 @@ debug@^4.1.0:
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
deepmerge@^4.2.2:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
|
||||
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
|
||||
|
||||
detect-libc@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
||||
@ -1714,7 +1825,12 @@ supports-color@^7.1.0:
|
||||
dependencies:
|
||||
has-flag "^4.0.0"
|
||||
|
||||
svgo@^2.4.0:
|
||||
svg-parser@^2.0.2:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5"
|
||||
integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==
|
||||
|
||||
svgo@^2.4.0, svgo@^2.5.0:
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.8.0.tgz#4ff80cce6710dc2795f0c7c74101e6764cfccd24"
|
||||
integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==
|
||||
|
||||
Loading…
Reference in New Issue
Block a user