Skip to content

Commit

Permalink
Updates and fixes (#1718)
Browse files Browse the repository at this point in the history
* Update packages

* Prettified Code!

* Update frontend packages

* Fixes

* Prettified Code!

* Update backend

* Update lockfile

Co-authored-by: timmo001 <timmo001@users.noreply.github.com>
  • Loading branch information
timmo001 and timmo001 authored Nov 9, 2021
1 parent 6a1645e commit d2555ef
Show file tree
Hide file tree
Showing 58 changed files with 2,808 additions and 2,629 deletions.
14 changes: 7 additions & 7 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
"winston": "3.3.3"
},
"devDependencies": {
"@types/compression": "1.7.1",
"@types/compression": "1.7.2",
"@types/cors": "2.8.12",
"@types/helmet": "4.0.0",
"@types/jest": "27.0.1",
"@types/jest": "27.0.2",
"@types/jsonwebtoken": "8.5.5",
"@types/nedb": "1.8.12",
"@types/serve-favicon": "2.5.3",
"jest": "27.0.6",
"jest-junit": "12.2.0",
"nodemon": "2.0.12",
"jest": "27.3.1",
"jest-junit": "13.0.0",
"nodemon": "2.0.14",
"shx": "0.3.3",
"ts-jest": "27.0.5",
"ts-jest": "27.0.7",
"ts-node-dev": "1.1.8",
"typescript": "4.3.5"
"typescript": "4.4.4"
}
}
1,598 changes: 781 additions & 817 deletions backend/yarn.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@
"@material-ui/icons": "4.11.2",
"@material-ui/lab": "4.0.0-alpha.60",
"@material-ui/styles": "4.11.4",
"@mdi/font": "5.9.55",
"@mdi/font": "6.4.95",
"array-move": "4.0.0",
"clsx": "1.1.1",
"history": "5.0.1",
"home-assistant-js-websocket": "5.11.1",
"history": "5.1.0",
"home-assistant-js-websocket": "5.11.2",
"moment": "2.29.1",
"query-string": "7.0.1",
"react": "17.0.2",
"react-color": "2.19.3",
"react-dom": "17.0.2",
"react-markdown": "7.0.0",
"react-markdown": "7.1.0",
"react-refresh": "0.10.0",
"react-scripts": "4.0.3",
"recharts": "2.1.0",
"recharts": "2.1.6",
"rss-parser": "3.12.0",
"socket.io-client": "2.3.1",
"superagent": "6.1.0",
"typeface-roboto": "1.1.13"
},
"devDependencies": {
"@types/node": "16.6.2",
"@types/react": "17.0.19",
"@types/react-color": "3.0.5",
"@types/react-dom": "17.0.9",
"@types/superagent": "4.1.12",
"jest-junit": "12.2.0",
"typescript": "4.3.5"
"@types/node": "16.11.7",
"@types/react": "17.0.34",
"@types/react-color": "3.0.6",
"@types/react-dom": "17.0.11",
"@types/superagent": "4.1.13",
"jest-junit": "13.0.0",
"typescript": "4.4.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/Components/Cards/AddCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function AddCard(props: AddCardProps): ReactElement {
<ButtonBase
className={classes.buttonCardContainer}
focusRipple
onClick={props.handleAdd}>
onClick={props.handleAdd}
>
<Card className={classes.card} elevation={1}>
<CardContent
className={classes.cardContent}
Expand All @@ -57,12 +58,14 @@ function AddCard(props: AddCardProps): ReactElement {
minWidth: cardSize,
maxHeight: cardSize,
maxWidth: cardSize,
}}>
}}
>
<Grid
className={classes.grid}
container
alignContent="center"
justifyContent="center">
justifyContent="center"
>
<span className={clsx("mdi", "mdi-plus", classes.icon)} />
</Grid>
</CardContent>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Components/Cards/AddGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ function AddGroup(props: AddGroupProps): ReactElement {
style={{
height: cardSize,
width: cardSize * 2,
}}>
}}
>
<ButtonBase
className={classes.buttonCardContainer}
focusRipple
onClick={props.handleAdd}>
onClick={props.handleAdd}
>
<CardContent>
<span className={clsx("mdi", "mdi-plus", classes.icon)} />
</CardContent>
Expand Down
18 changes: 12 additions & 6 deletions frontend/src/Components/Cards/Base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,16 @@ function Base(props: BaseProps): ReactElement {
onTouchCancel={handleHoldCancel}
onTouchEnd={handleHoldCancel}
onMouseUp={handleHoldCancel}
onMouseLeave={handleHoldCancel}>
onMouseLeave={handleHoldCancel}
>
<Card
className={classes.card}
square={props.card.square}
elevation={elevation}
style={{
background: background,
}}>
}}
>
<CardContent
className={classes.cardContent}
style={{
Expand All @@ -333,7 +335,8 @@ function Base(props: BaseProps): ReactElement {
maxHeight: height,
maxWidth: width,
padding: props.card.padding ? props.card.padding : 12,
}}>
}}
>
<Grid container direction="row">
<Grid item xs>
{props.card.title && (
Expand All @@ -347,7 +350,8 @@ function Base(props: BaseProps): ReactElement {
component="h3"
gutterBottom
noWrap
style={{ fontSize: props.card.title_size }}>
style={{ fontSize: props.card.title_size }}
>
{props.card.title}
</Typography>
)}
Expand All @@ -357,7 +361,8 @@ function Base(props: BaseProps): ReactElement {
<IconButton
aria-label="close"
size="small"
onClick={props.handleCloseExpand}>
onClick={props.handleCloseExpand}
>
<CloseIcon fontSize="small" />
</IconButton>
)}
Expand All @@ -371,7 +376,8 @@ function Base(props: BaseProps): ReactElement {
<Dialog
PaperProps={{ style: { background: "transparent" } }}
open={expandCard}
onClose={handleCloseExpand}>
onClose={handleCloseExpand}
>
<Grid container justifyContent="center">
<Base
{...props}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/Components/Cards/Checklist/Checklist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function Checklist(props: BaseProps): ReactElement | null {
direction="row"
justifyContent="center"
alignContent="flex-start"
alignItems="center">
alignItems="center"
>
{useMemo(() => {
if (
props.card.checklist_items !== undefined &&
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/Components/Cards/Checklist/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ function Checklist(props: ItemProps): ReactElement | null {
direction="row"
justifyContent="center"
alignContent="flex-start"
alignItems="center">
alignItems="center"
>
<Grid item>
<Checkbox
checked={item.checked}
Expand All @@ -129,7 +130,8 @@ function Checklist(props: ItemProps): ReactElement | null {
aria-label="more"
aria-controls="long-menu"
aria-haspopup="true"
onClick={handleOpenMenu}>
onClick={handleOpenMenu}
>
<MoreVertIcon />
</IconButton>
</Grid>
Expand All @@ -144,7 +146,8 @@ function Checklist(props: ItemProps): ReactElement | null {
style: {
minWidth: "20ch",
},
}}>
}}
>
{props.position > 0 && (
<MenuItem onClick={handleMoveUp}>Move Up</MenuItem>
)}
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Components/Cards/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ function Markdown(props: BaseProps): ReactElement | null {
className={classes.text}
color="textPrimary"
variant="body1"
component="span">
component="span"
>
<ReactMarkdown
skipHtml={false}
components={{
a: Link,
code: Code,
}}>
}}
>
{props.card.content}
</ReactMarkdown>
</Typography>
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Components/Cards/News.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ function News(props: BaseProps): ReactElement {
direction="row"
justifyContent="center"
alignContent="center"
alignItems="center">
alignItems="center"
>
{props.card.width && props.card.width > 2 && item.imageURL && (
<Grid className={classes.mediaContainer} item xs={3}>
<a href={item.url} target="_blank" rel="noopener noreferrer">
Expand All @@ -144,7 +145,8 @@ function News(props: BaseProps): ReactElement {
variant="caption"
component="h5"
gutterBottom
noWrap>
noWrap
>
<ReactMarkdown skipHtml={false}>{item.meta}</ReactMarkdown>
</Typography>
)}
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/Components/Cards/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ function Overlay(props: BaseProps): ReactElement {
container
alignContent="center"
alignItems="center"
justifyContent="center">
justifyContent="center"
>
<IconButton color="primary" onClick={handleEdit}>
<EditIcon fontSize="small" />
</IconButton>
Expand All @@ -73,13 +74,15 @@ function Overlay(props: BaseProps): ReactElement {
<IconButton
disabled={props.position === 0}
color="primary"
onClick={props.handleMoveUp}>
onClick={props.handleMoveUp}
>
<ArrowLeftIcon fontSize="small" />
</IconButton>
<IconButton
disabled={props.position === props.maxPosition}
color="primary"
onClick={props.handleMoveDown}>
onClick={props.handleMoveDown}
>
<ArrowRightIcon fontSize="small" />
</IconButton>
{deleteConfirm && (
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Components/Cards/RSS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function RSS(props: BaseProps): ReactElement {
direction="row"
justifyContent="center"
alignContent="center"
alignItems="center">
alignItems="center"
>
<Grid item xs>
<Typography variant="subtitle1" component="h3">
<ReactMarkdown skipHtml={false}>{item.heading}</ReactMarkdown>
Expand All @@ -122,7 +123,8 @@ function RSS(props: BaseProps): ReactElement {
variant="caption"
component="h5"
gutterBottom
noWrap>
noWrap
>
<ReactMarkdown skipHtml={false}>{item.meta}</ReactMarkdown>
</Typography>
)}
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/Components/Configuration/Configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function Configuration(props: ConfigurationBaseProps): ReactElement {
direction="column"
justifyContent="center"
alignContent="center"
spacing={1}>
spacing={1}
>
{sections.map((section: ConfigSection, key: number) => (
<Grid
className={classes.section}
Expand All @@ -56,7 +57,8 @@ function Configuration(props: ConfigurationBaseProps): ReactElement {
lg={4}
md={8}
sm={10}
xs={12}>
xs={12}
>
<Grid item xs container>
{section.title && (
<Grid item xs>
Expand Down
Loading

0 comments on commit d2555ef

Please sign in to comment.