1
0
Signed-off-by: James Ketrenos <james@ketrenos.com>
This commit is contained in:
James Ketrenos 2023-03-30 12:08:44 -07:00
parent 84ef980c42
commit 260668d759
27 changed files with 3523 additions and 2072 deletions

View File

@ -40,8 +40,18 @@ RUN apt-get -q update \
tree \
inotify-tools \
gettext-base \
gh \
git \
&& apt-get clean \
&& 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 \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log}
@ -88,7 +98,6 @@ RUN \
RUN \
if [[ -z "${DEVELOPMENT}" ]]; then \
cd /home/user/client ; \
npm run build ; \
fi
COPY /scripts /opt/scripts

3887
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,9 @@
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.10.16",
"@mui/material": "^5.11.10",
"@material-ui/core": "^4.12.4",
"@mui/icons-material": "^5.11.11",
"@mui/material": "^5.11.15",
"@types/jest": "^29.2.3",
"@types/node": "^18.11.10",
"@types/react": "^18.0.26",

View File

@ -0,0 +1,12 @@
import { createContext } from "react";
const global = {
chatId: undefined,
ws: undefined,
name: "",
chat: []
};
const GlobalContext = createContext(global);
export { GlobalContext, global };

View File

@ -1,6 +1,6 @@
import React from "react";
import Avatar from '@material-ui/core/Avatar';
import { Avatar } from '@material-ui/core';
import { useStyles } from './Styles.js';

View File

@ -1,6 +1,5 @@
import React, { useState, useEffect, useContext, useRef } from "react";
import Paper from '@material-ui/core/Paper';
import List from '@material-ui/core/List';
import { Paper, List } from '@material-ui/core';
import "./PlayerList.css";
import { PlayerColor } from './PlayerColor.js';

View File

@ -1,7 +1,6 @@
import React, { useState } from "react";
import "./PlayerName.css";
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
import { TextField, Button } from '@material-ui/core';
const PlayerName = ({ name, setName }) => {
const [edit, setEdit] = useState(name);

30
client/src/Styles.js Normal file
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
client/src/assets/link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
client/src/assets/man-robber.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
client/src/assets/no-network.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
client/src/assets/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -3,8 +3,6 @@ services:
ketr.chat:
volumes:
- /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 #
# Hot mount client and server for dynamic changes in DEVELOPMENT
- ./scripts:/opt/scripts # Hot update via bind

View File

@ -13,8 +13,6 @@ services:
tty: true # Needed for react-scripts
restart: always
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
- ./logs:/home/user/logs #
ports:
@ -33,8 +31,6 @@ services:
tty: true # Needed for react-scripts
restart: always
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
- ./scripts:/opt/scripts # Hot update via bind
ports:

View File

@ -4,6 +4,4 @@ services:
ketr.chat-production:
volumes:
- /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 #

1624
server/package-lock.json generated

File diff suppressed because it is too large Load Diff