Builds
Signed-off-by: James Ketrenos <james@ketrenos.com>
15
Dockerfile
@ -40,8 +40,18 @@ RUN apt-get -q update \
|
|||||||
tree \
|
tree \
|
||||||
inotify-tools \
|
inotify-tools \
|
||||||
gettext-base \
|
gettext-base \
|
||||||
gh \
|
&& apt-get clean \
|
||||||
git \
|
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
|
||||||
|
|
||||||
|
# Build dependencies when running npm install
|
||||||
|
RUN apt-get -q update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install \
|
||||||
|
--no-install-recommends -y \
|
||||||
|
make \
|
||||||
|
python-is-python3 \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
libc-dev \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
|
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
|
||||||
|
|
||||||
@ -88,7 +98,6 @@ RUN \
|
|||||||
RUN \
|
RUN \
|
||||||
if [[ -z "${DEVELOPMENT}" ]]; then \
|
if [[ -z "${DEVELOPMENT}" ]]; then \
|
||||||
cd /home/user/client ; \
|
cd /home/user/client ; \
|
||||||
npm run build ; \
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COPY /scripts /opt/scripts
|
COPY /scripts /opt/scripts
|
||||||
|
3887
client/package-lock.json
generated
@ -5,8 +5,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.6",
|
"@emotion/react": "^11.10.6",
|
||||||
"@emotion/styled": "^11.10.6",
|
"@emotion/styled": "^11.10.6",
|
||||||
"@mui/icons-material": "^5.10.16",
|
"@material-ui/core": "^4.12.4",
|
||||||
"@mui/material": "^5.11.10",
|
"@mui/icons-material": "^5.11.11",
|
||||||
|
"@mui/material": "^5.11.15",
|
||||||
"@types/jest": "^29.2.3",
|
"@types/jest": "^29.2.3",
|
||||||
"@types/node": "^18.11.10",
|
"@types/node": "^18.11.10",
|
||||||
"@types/react": "^18.0.26",
|
"@types/react": "^18.0.26",
|
||||||
|
12
client/src/GlobalContext.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { createContext } from "react";
|
||||||
|
|
||||||
|
const global = {
|
||||||
|
chatId: undefined,
|
||||||
|
ws: undefined,
|
||||||
|
name: "",
|
||||||
|
chat: []
|
||||||
|
};
|
||||||
|
|
||||||
|
const GlobalContext = createContext(global);
|
||||||
|
|
||||||
|
export { GlobalContext, global };
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Avatar from '@material-ui/core/Avatar';
|
import { Avatar } from '@material-ui/core';
|
||||||
|
|
||||||
import { useStyles } from './Styles.js';
|
import { useStyles } from './Styles.js';
|
||||||
|
|
||||||
@ -14,4 +14,4 @@ const PlayerColor = ({ color }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { PlayerColor };
|
export { PlayerColor };
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React, { useState, useEffect, useContext, useRef } from "react";
|
import React, { useState, useEffect, useContext, useRef } from "react";
|
||||||
import Paper from '@material-ui/core/Paper';
|
import { Paper, List } from '@material-ui/core';
|
||||||
import List from '@material-ui/core/List';
|
|
||||||
|
|
||||||
import "./PlayerList.css";
|
import "./PlayerList.css";
|
||||||
import { PlayerColor } from './PlayerColor.js';
|
import { PlayerColor } from './PlayerColor.js';
|
||||||
@ -174,4 +173,4 @@ const PlayerList = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { PlayerList };
|
export { PlayerList };
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import "./PlayerName.css";
|
import "./PlayerName.css";
|
||||||
import TextField from '@material-ui/core/TextField';
|
import { TextField, Button } from '@material-ui/core';
|
||||||
import Button from '@material-ui/core/Button';
|
|
||||||
|
|
||||||
const PlayerName = ({ name, setName }) => {
|
const PlayerName = ({ name, setName }) => {
|
||||||
const [edit, setEdit] = useState(name);
|
const [edit, setEdit] = useState(name);
|
||||||
@ -34,4 +33,4 @@ const PlayerName = ({ name, setName }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { PlayerName };
|
export { PlayerName };
|
||||||
|
30
client/src/Styles.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
|
import { orange, lightBlue, red, grey } from '@material-ui/core/colors';
|
||||||
|
|
||||||
|
const useStyles = makeStyles((theme) => ({
|
||||||
|
root: {
|
||||||
|
display: 'flex',
|
||||||
|
'& > *': {
|
||||||
|
margin: theme.spacing(1),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
R: {
|
||||||
|
color: theme.palette.getContrastText(red[500]),
|
||||||
|
backgroundColor: red[500],
|
||||||
|
},
|
||||||
|
O: {
|
||||||
|
color: theme.palette.getContrastText(orange[500]),
|
||||||
|
backgroundColor: orange[500],
|
||||||
|
},
|
||||||
|
W: {
|
||||||
|
color: theme.palette.getContrastText(grey[50]),
|
||||||
|
backgroundColor: grey[50],
|
||||||
|
},
|
||||||
|
B: {
|
||||||
|
color: theme.palette.getContrastText(lightBlue[500]),
|
||||||
|
backgroundColor: lightBlue[500],
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
export { useStyles };
|
BIN
client/src/assets/down.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
client/src/assets/favicon-128.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
client/src/assets/favicon-152.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
client/src/assets/favicon-167.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
client/src/assets/favicon-180.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
client/src/assets/favicon-192.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
client/src/assets/favicon-256.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
client/src/assets/favicon-32.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
client/src/assets/link.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
client/src/assets/man-robber.png
Executable file
After Width: | Height: | Size: 27 KiB |
BIN
client/src/assets/no-network.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
client/src/assets/raptor-robber.png
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
client/src/assets/tabletop.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
client/src/assets/up.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
client/src/assets/woman-robber.png
Executable file
After Width: | Height: | Size: 18 KiB |
@ -3,8 +3,6 @@ services:
|
|||||||
ketr.chat:
|
ketr.chat:
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
||||||
- $HOME/.netrc:/root/.netrc # Use current user .netrc
|
|
||||||
- $HOME/.config/gh:/root/.config/gh # Use current user GH config
|
|
||||||
- ./logs:/home/user/logs #
|
- ./logs:/home/user/logs #
|
||||||
# Hot mount client and server for dynamic changes in DEVELOPMENT
|
# Hot mount client and server for dynamic changes in DEVELOPMENT
|
||||||
- ./scripts:/opt/scripts # Hot update via bind
|
- ./scripts:/opt/scripts # Hot update via bind
|
||||||
|
@ -13,8 +13,6 @@ services:
|
|||||||
tty: true # Needed for react-scripts
|
tty: true # Needed for react-scripts
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- $HOME/.netrc:/root/.netrc # Use current user .netrc
|
|
||||||
- $HOME/.config/gh:/root/.config/gh # GitHub 'gh' credentials for GitHub actions
|
|
||||||
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
||||||
- ./logs:/home/user/logs #
|
- ./logs:/home/user/logs #
|
||||||
ports:
|
ports:
|
||||||
@ -33,8 +31,6 @@ services:
|
|||||||
tty: true # Needed for react-scripts
|
tty: true # Needed for react-scripts
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- $HOME/.netrc:/root/.netrc # Use current user .netrc
|
|
||||||
- $HOME/.config/gh:/root/.config/gh # GitHub 'gh' credentials for GitHub actions
|
|
||||||
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
||||||
- ./scripts:/opt/scripts # Hot update via bind
|
- ./scripts:/opt/scripts # Hot update via bind
|
||||||
ports:
|
ports:
|
||||||
|
@ -4,6 +4,4 @@ services:
|
|||||||
ketr.chat-production:
|
ketr.chat-production:
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
- /etc/nginx/ssl:/etc/nginx/ssl:ro # Use host web keys
|
||||||
- $HOME/.netrc:/root/.netrc # Use current user .netrc
|
|
||||||
- $HOME/.config/gh:/root/.config/gh # Use current user GH config
|
|
||||||
- ./logs:/home/user/logs #
|
- ./logs:/home/user/logs #
|
||||||
|