Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Merge pull request #40 from Kedyn/design
Browse files Browse the repository at this point in the history
Design
  • Loading branch information
Kedyn authored Sep 25, 2020
2 parents a2f1708 + 48500dd commit c2600a9
Show file tree
Hide file tree
Showing 58 changed files with 2,418 additions and 676 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"rules": {
"camelcase": "error"
},
"parser": "@typescript-eslint/parser"
}
2 changes: 0 additions & 2 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
" const classes = useStyles();",
"",
" return (",
" <React.Fragment>",
" <div className={classes.root}>$0</div>",
" </React.Fragment>",
" );",
"}"
]
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Released]

### [v0.8.0] - 9/24/2020

Switched to Kevin Han's (@khany) UI design.

#### Added

- Separate Scores for impostors and innocents.
- Color change menu for players
- Reset Scores
- Reset Round (players positions)
- Reset all button, resets to default.
- Reset Notes
- Settings Modal
- Recovery Notes Modal
- Changelog Modal

#### Fixed

- Player background color contrast

#### Changed

- Use names to the settings modal.

#### Removed

- Light theme
- Draggable map characters

### [v0.7.0] - 9/15/2020

Code refactoring / project restructuring.
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ A web to help keep track of among us game.

## Features

- Editable title
- Score tracking
- Draggable players between innocent/sus/hit list/evil/dead/unknown sections
- Themes
- Notes
- Maps
- Map draggable players

## Usage

Expand Down Expand Up @@ -39,8 +36,9 @@ other support on this project such as:

[Adam Gausmann](https://github.com/agausmann)
Pedro / Dian\_\_
Rydannn (twitch handle)
GeneralMitch (twitch handle)
Rydannn (twitch handle)
GeneralMitch (twitch handle)
Kermitigated (twitch handle)

Please if you would not like to be mentioned here or your information is wrong
let me know so I can remove it or fix it, thank you!
Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,12 @@
"lint-staged": {
"*.{ts,tsx}": "eslint --cache --fix",
"*.{ts,tsx,md,html}": "prettier --write"
}
}
},
"browserslist": [
"last 3 and_chr versions",
"last 3 chrome versions",
"last 3 opera versions",
"last 3 ios_saf versions",
"last 3 safari versions"
]
}
Binary file modified src/assets/Mirahq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/Polus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/TheSkeld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 96 additions & 16 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
import { INITIAL_DATA, useData } from "context";
import { JssProvider, ThemeProvider } from "react-jss";

import ControlsContent from "./ControlsContent";
import FeedbackForm from "./FeedbackForm";
import MainContent from "./MainContent";
import MapsContent from "./MapsContent";
import Modal from "./common/Modal";
import React from "react";
import Recovery from "./Recovery";
import jssSetUp from "utils/jssSetUp";
import { useData } from "context";

export default function App(): JSX.Element {
// eslint-disable-next-line
const { theme } = useData()!;
const { version, theme } = useData()!; // eslint-disable-line
const [showNotes, setShowNotes] = React.useState(false);
const [showForm, setShowForm] = React.useState(false);

React.useEffect(() => {
if (version !== INITIAL_DATA.version) {
setShowNotes(true);
}
}, []);

const patchNotes = [
{
title: "Added",
items: [
"Separate Scores for impostors and innocents",
"Color change menu for players (click player icon to open)",
"Reset Scores",
"Reset Round (players positions)",
"Reset all button, resets players positions and scores.",
"Reset Notes",
"Settings Modal",
"Recovery Notes Modal",
"Change log Modal",
"Feedback Modal",
],
},
{ title: "Fixed", items: ["Player background color contrast"] },
{ title: "Changed", items: ["Use names to the settings modal."] },
{ title: "Removed", items: ["Light theme", "Draggable map characters"] },
{
title: "Developer Notes",
items: [
"We are working in allowing custom theme colors.",
"We added a feedback link at the bottom at the page, we love to hear from all of you.",
],
},
];

return (
<React.Fragment>
Expand All @@ -22,20 +60,62 @@ export default function App(): JSX.Element {
<MapsContent />
</main>
<footer>
<div>
<small>
fusliez notes{" "}
<a href="https://github.com/Kedyn/fusliez-notes/releases/tag/v0.7.0">
v0.7.0
</a>{" "}
[9/14/2020] made with &#10084; by the{" "}
<a href="https://github.com/Kedyn/fusliez-notes#authors-and-acknowledgment">
fuslie fam
</a>
.
</small>
</div>
<small>
fusliez notes{" "}
<a
href="https://github.com/Kedyn/fusliez-notes/releases/tag/v0.7.0"
onClick={(
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
) => {
event.preventDefault();
setShowNotes(!showNotes);
}}
>
{version}
</a>{" "}
[9/24/2020] made with &#10084; by the{" "}
<a href="https://github.com/Kedyn/fusliez-notes#authors-and-acknowledgment">
fuslie fam
</a>
.{" "}
<a
href="#"
onClick={(
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
) => {
event.preventDefault();
setShowForm(true);
}}
>
Feedback
</a>
<Modal
title="Feedback Form"
show={showForm}
onClose={() => setShowForm(false)}
>
<FeedbackForm />
</Modal>
</small>
</footer>
<Recovery />
{/* CHANGE LOG */}
<Modal
title="Change Log v0.8.0"
show={showNotes}
onClose={() => setShowNotes(false)}
>
{patchNotes.map(({ title, items }) => (
<div key={title}>
<h4>{title}</h4>
<ul>
{items.map((item) => (
<li key={item}>{item}</li>
))}
</ul>
</div>
))}
</Modal>
</React.Suspense>
</ThemeProvider>
</JssProvider>
Expand Down
44 changes: 44 additions & 0 deletions src/components/ColorsMenu/ColorsMenu.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { ITheme } from "utils/types";
import { createUseStyles } from "react-jss";
import colorNameToRGB from "utils/colorConverter";

export const useColorSwatchStyles = createUseStyles({
playerColorChangeMenuIcon: (props) => ({
display: "block",
width: "30px",
height: "30px",
borderRadius: "15px",
flex: "1 1 calc(25% - 10px)",
backgroundColor: props.targetColor,
margin: "0.15rem",

"&:hover": {
backgroundColor: `rgba(${colorNameToRGB(props.targetColor)}, 0.5)`,
cursor: "pointer",
},
}),
});

export default createUseStyles((theme: ITheme) => ({
root: {},
playerColorChangeMenu: {
alignItems: "center",
background: theme.backgroundColor,
border: "0.0625rem solid rgba(240, 240, 240, 0.25)",
borderRadius: "6px",
boxShadow: "0 0 1rem rgba(240, 240, 240, 0.1)",
bottom: "110%",
display: "flex",
flex: 4,
flexWrap: "wrap",
left: 0,
justifyContent: "space-between",
position: "absolute",
padding: "0.25rem",
width: "100%",
zIndex: 10,
},
playerColorChangeMenuHidden: {
display: "none",
},
}));
Loading

0 comments on commit c2600a9

Please sign in to comment.