Skip to content

Commit 7f03b43

Browse files
authored
Merge pull request #53 from CodeDead/release/v2.2.0
Release/v2.2.0
2 parents dac12f6 + f27d05c commit 7f03b43

File tree

32 files changed

+3797
-2943
lines changed

32 files changed

+3797
-2943
lines changed

.yarn/plugins/yarn-up-all-plugin.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports={name:"yarn-up-all-plugin",factory:a=>{const{Configuration:b,Project:c}=a("@yarnpkg/core"),{Cli:d,Command:e}=a("clipanion"),f=a("yup"),g=a("@yarnpkg/plugin-essentials"),h=(a,b)=>a?`@${a}/${b}`:b,i=(a,b)=>{const c=[...a.values()];return b?c.filter(a=>{const c=h(a[1].scope,a[1].name);return!b.includes(c)}):c};class j extends e{async execute(){if(!g.default.commands)throw new Error("Yarn commands are not available!");const a=await b.find(this.context.cwd,this.context.plugins),{workspace:e}=await c.find(a,this.context.cwd),f=[...e.manifest.dependencies,...e.manifest.devDependencies],j=i(f,this.exclude?this.exclude.split(" "):null),k=j.map(a=>h(a[1].scope,a[1].name)),l=d.from(g.default.commands);return l.runExit(["up",...k],this.context)}}return j.addOption("exclude",e.String("--exclude")),j.addPath("up-all"),j.schema=f.object().shape({exclude:f.string()}),j.usage=e.Usage({description:"Yarn 2 plugin that will upgrade all dependencies to their latest version with one simple command",details:"This command will upgrade all dependencies to their latest version",examples:[["Upgrade all dependencies","yarn up-all"],["Upgrade all dependencies but exclude a single dependency","yarn up-all --exclude package"],["Upgrade all dependencies but exclude multiple dependencies","yarn up-all --exclude \"package1 package2\""]]}),{commands:[j]}}};
1+
module.exports={name:"yarn-up-all-plugin",factory:a=>{const{Configuration:b,Project:c}=a("@yarnpkg/core"),{Cli:d,Command:e,Option:f}=a("clipanion"),g=a("@yarnpkg/plugin-essentials"),h=a("typanion"),i=(a,b)=>a?`@${a}/${b}`:b,j=(a,b)=>{const c=[...a.values()];return b?c.filter(a=>{const c=i(a[1].scope,a[1].name);return!b.includes(c)}):c};class k extends e{constructor(){super(),this.exclude=f.String("-e,--exclude",{validator:h.isString()})}async execute(){if(!g.default.commands)throw new Error("Yarn commands are not available!");const a=await b.find(this.context.cwd,this.context.plugins),{workspace:e}=await c.find(a,this.context.cwd),f=[...e.manifest.dependencies,...e.manifest.devDependencies],h=j(f,this.exclude?this.exclude.split(" "):null),k=h.map(a=>i(a[1].scope,a[1].name)),l=d.from(g.default.commands);return l.runExit(["up",...k],this.context)}}return k.paths=[["up-all"]],k.usage={category:"Utilities",description:"Yarn 2 plugin that will upgrade all dependencies to their latest version with one simple command",details:"This command will upgrade all dependencies to their latest version. You can exclude certain dependencies from being upgraded by using the `-e,--exclude` option.",examples:[["Upgrade all dependencies","yarn up-all"],["Upgrade all dependencies but exclude a single dependency","yarn up-all --exclude package"],["Upgrade all dependencies but exclude a single dependency","yarn up-all -e package"],["Upgrade all dependencies but exclude multiple dependencies","yarn up-all --exclude \"package1 package2\""]]},{commands:[k]}}};

.yarn/releases/yarn-2.4.2.cjs

Lines changed: 0 additions & 55 deletions
This file was deleted.

.yarn/releases/yarn-3.0.2.cjs

Lines changed: 631 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ nodeLinker: node-modules
22

33
plugins:
44
- path: .yarn/plugins/yarn-up-all-plugin.cjs
5-
spec: "https://github.com/e5mode/yarn-up-all/releases/download/1.0.5/index.js"
5+
spec: "https://github.com/e5mode/yarn-up-all/releases/download/1.1.0/index.js"
66

7-
yarnPath: .yarn/releases/yarn-2.4.2.cjs
7+
yarnPath: .yarn/releases/yarn-3.0.2.cjs

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
![DeadHash](https://i.imgur.com/PWrqQ67.png)
1+
![DeadHash](https://i.imgur.com/CkzWk7u.png)
22

33
# DeadHash
44

55
![GitHub package.json version](https://img.shields.io/github/package-json/v/CodeDead/DeadHash-js)
66
![GitHub](https://img.shields.io/github/license/CodeDead/DeadHash-Js)
7-
![GitHub Releases (by Release)](https://img.shields.io/github/downloads/CodeDead/DeadHash-js/2.1.3/total)
7+
![GitHub Releases (by Release)](https://img.shields.io/github/downloads/CodeDead/DeadHash-js/v2.2.0/total)
88

99
DeadHash is a free and open-source utility to calculate file and text hashes and checksums. The following calculations are supported:
1010

@@ -26,19 +26,13 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
2626

2727
## Building
2828

29-
In order to produce binary distributable files or to start a development build, you must first issue the following command,
30-
in order to ensure that the React build is up-to-date:
31-
```
32-
yarn react-build
33-
```
34-
35-
After running `yarn react-build`, you can issue the following command in order to produce the binary distributable files:
36-
```
29+
In order to produce binary distributable files, you must issue the following command:
30+
```shell
3731
yarn build
3832
```
3933

40-
If you want to start the development version, you can issue the following command, after running `yarn react-build`:
41-
```
34+
If you want to start the development version, you can issue the following command:
35+
```shell
4236
yarn start
4337
```
4438

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deadhash",
3-
"version": "2.1.3",
3+
"version": "2.2.0",
44
"description": "File and text hash calculator",
55
"homepage": "./",
66
"private": true,
@@ -35,16 +35,18 @@
3535
},
3636
"main": "public/electron.js",
3737
"dependencies": {
38-
"@material-ui/core": "^4.11.4",
39-
"@material-ui/icons": "^4.11.2",
38+
"@emotion/react": "^11.4.1",
39+
"@emotion/styled": "^11.3.0",
40+
"@mui/icons-material": "^5.0.1",
41+
"@mui/material": "^5.0.2",
4042
"crc": "^3.8.0",
4143
"cross-env": "^7.0.3",
4244
"electron-is-dev": "^2.0.0",
4345
"react": "^17.0.2",
4446
"react-contexify": "^5.0.0",
4547
"react-dom": "^17.0.2",
46-
"react-router": "^5.2.0",
47-
"react-router-dom": "^5.2.0",
48+
"react-router": "^5.2.1",
49+
"react-router-dom": "^5.3.0",
4850
"react-scripts": "^4.0.3"
4951
},
5052
"scripts": {
@@ -55,7 +57,7 @@
5557
"electron-build": "electron-builder",
5658
"release": "yarn react-build && electron-builder -wl --publish=always",
5759
"build": "yarn react-build && yarn electron-build -wl",
58-
"start": "concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\""
60+
"start": "yarn react-build && concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\""
5961
},
6062
"browserslist": {
6163
"production": [
@@ -70,15 +72,15 @@
7072
]
7173
},
7274
"devDependencies": {
73-
"concurrently": "^6.2.0",
74-
"electron": "^13.1.1",
75-
"electron-builder": "^22.10.5",
76-
"eslint": "^7.28.0",
75+
"concurrently": "^6.2.2",
76+
"electron": "^15.0.0",
77+
"electron-builder": "^22.11.7",
78+
"eslint": "^7.32.0",
7779
"eslint-config-airbnb": "^18.2.1",
78-
"eslint-plugin-import": "^2.23.4",
80+
"eslint-plugin-import": "^2.24.2",
7981
"eslint-plugin-jsx-a11y": "^6.4.1",
80-
"eslint-plugin-react": "^7.24.0",
82+
"eslint-plugin-react": "^7.26.1",
8183
"eslint-plugin-react-hooks": "^4.2.0",
82-
"wait-on": "^5.3.0"
84+
"wait-on": "^6.0.0"
8385
}
8486
}

src/components/AlertDialog/index.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { useState } from 'react';
2-
import DialogTitle from '@material-ui/core/DialogTitle';
3-
import DialogContent from '@material-ui/core/DialogContent';
4-
import DialogContentText from '@material-ui/core/DialogContentText';
5-
import DialogActions from '@material-ui/core/DialogActions';
6-
import Button from '@material-ui/core/Button';
7-
import Dialog from '@material-ui/core/Dialog';
2+
import DialogTitle from '@mui/material/DialogTitle';
3+
import DialogContent from '@mui/material/DialogContent';
4+
import DialogContentText from '@mui/material/DialogContentText';
5+
import DialogActions from '@mui/material/DialogActions';
6+
import Button from '@mui/material/Button';
7+
import Dialog from '@mui/material/Dialog';
88

99
const AlertDialog = ({
1010
title, content, ok, onClose,

src/components/App/index.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import React, { useContext, useEffect } from 'react';
22
import { BrowserRouter, Switch, Route } from 'react-router-dom';
3-
import { CssBaseline } from '@material-ui/core';
4-
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
5-
import Home from '../../routes/Home';
6-
import Settings from '../../routes/Settings';
3+
import { CssBaseline } from '@mui/material';
4+
import { createTheme, ThemeProvider } from '@mui/material/styles';
75
import ThemeSelector from '../../utils/ThemeSelector';
86
import TopBar from '../TopBar';
9-
import About from '../../routes/About';
10-
import File from '../../routes/File';
11-
import Text from '../../routes/Text';
127
import DropZone from '../DropZone';
138
import { MainContext } from '../../contexts/MainContextProvider';
149
import { CryptoContext } from '../../contexts/CryptoContextReducer';
@@ -18,6 +13,11 @@ import {
1813
setFileHashes,
1914
setFileHashLoading, setTextHashError, setTextHashes, setTextHashLoading,
2015
} from '../../reducers/CryptoReducer/Actions';
16+
import Home from '../../routes/Home';
17+
import Text from '../../routes/Text';
18+
import File from '../../routes/File';
19+
import About from '../../routes/About';
20+
import Settings from '../../routes/Settings';
2121

2222
const { ipcRenderer } = window.require('electron');
2323

@@ -30,10 +30,10 @@ const App = () => {
3030

3131
const color = ThemeSelector(themeIndex);
3232

33-
const theme = createMuiTheme({
33+
const theme = createTheme({
3434
palette: {
3535
primary: color,
36-
type: themeStyle,
36+
mode: themeStyle,
3737
},
3838
});
3939

src/components/BackButton/index.jsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import React from 'react';
2-
import Button from '@material-ui/core/Button';
3-
import ArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft';
2+
import Button from '@mui/material/Button';
3+
import ArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
4+
import { useHistory } from 'react-router-dom';
45

5-
const BackButton = ({ goBack }) => {
6+
const BackButton = () => {
7+
const history = useHistory();
68
/**
79
* Call the goBack event
810
* @param e The event argument
911
*/
1012
const back = (e) => {
1113
if (e) e.preventDefault();
12-
if (goBack) goBack();
14+
history.goBack();
1315
};
1416

1517
return (
16-
<Button color="primary" onClick={back}>
18+
<Button
19+
onClick={back}
20+
size="small"
21+
>
1722
<ArrowLeftIcon />
1823
</Button>
1924
);

src/components/CompareField/index.jsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from 'react';
2+
import TextField from '@mui/material/TextField';
3+
import CopyPasteMenu from '../CopyPasteMenu';
4+
5+
const CompareField = ({
6+
copyLabel, pasteLabel, onPaste, compareLabel, value, onChange,
7+
}) => {
8+
/**
9+
* Paste data
10+
*/
11+
const paste = () => {
12+
if (onPaste) {
13+
onPaste();
14+
}
15+
};
16+
17+
/**
18+
* Change the value
19+
* @param e The event argument
20+
*/
21+
const changeValue = (e) => {
22+
if (onChange) {
23+
onChange(e.target.value);
24+
}
25+
};
26+
27+
return (
28+
<CopyPasteMenu
29+
id={1}
30+
copyData={() => navigator.clipboard.writeText(value)}
31+
copy={copyLabel}
32+
paste={pasteLabel}
33+
pasteData={paste}
34+
>
35+
<TextField
36+
fullWidth
37+
value={value}
38+
onChange={changeValue}
39+
label={compareLabel}
40+
/>
41+
</CopyPasteMenu>
42+
);
43+
};
44+
45+
export default CompareField;

src/components/ConfirmationDialog/index.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
2-
import Dialog from '@material-ui/core/Dialog';
3-
import DialogTitle from '@material-ui/core/DialogTitle';
4-
import DialogContent from '@material-ui/core/DialogContent';
5-
import DialogContentText from '@material-ui/core/DialogContentText';
6-
import DialogActions from '@material-ui/core/DialogActions';
7-
import Button from '@material-ui/core/Button';
2+
import Dialog from '@mui/material/Dialog';
3+
import DialogTitle from '@mui/material/DialogTitle';
4+
import DialogContent from '@mui/material/DialogContent';
5+
import DialogContentText from '@mui/material/DialogContentText';
6+
import DialogActions from '@mui/material/DialogActions';
7+
import Button from '@mui/material/Button';
88

99
const ConfirmationDialog = ({
1010
open, title, content, onAccept, onCancel, onClose, yes, no,
@@ -46,10 +46,10 @@ const ConfirmationDialog = ({
4646
</DialogContentText>
4747
</DialogContent>
4848
<DialogActions>
49-
<Button onClick={cancel} color="primary">
49+
<Button onClick={cancel}>
5050
{no}
5151
</Button>
52-
<Button onClick={accept} color="primary" autoFocus>
52+
<Button onClick={accept} autoFocus>
5353
{yes}
5454
</Button>
5555
</DialogActions>

src/components/CopyPasteMenu/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Item, Menu, useContextMenu } from 'react-contexify';
3-
import CopyIcon from '@material-ui/icons/FileCopy';
4-
import PasteIcon from '@material-ui/icons/Assignment';
3+
import CopyIcon from '@mui/icons-material/FileCopy';
4+
import PasteIcon from '@mui/icons-material/Assignment';
55

66
const CopyPasteMenu = ({
77
id, children, copyData, pasteData, copy, paste,

src/components/CryptographyMenu/index.jsx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
import React, { useState } from 'react';
2-
import { makeStyles } from '@material-ui/core/styles';
3-
import ListItem from '@material-ui/core/ListItem';
4-
import Collapse from '@material-ui/core/Collapse';
5-
import ListItemIcon from '@material-ui/core/ListItemIcon';
6-
import ListItemText from '@material-ui/core/ListItemText';
7-
import List from '@material-ui/core/List';
8-
import ExpandLessIcon from '@material-ui/icons/ExpandLess';
9-
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
10-
import KeyIcon from '@material-ui/icons/VpnKey';
11-
12-
const useStyles = makeStyles((theme) => ({
13-
nested: {
14-
paddingLeft: theme.spacing(4),
15-
},
16-
}));
2+
import ListItem from '@mui/material/ListItem';
3+
import Collapse from '@mui/material/Collapse';
4+
import ListItemIcon from '@mui/material/ListItemIcon';
5+
import ListItemText from '@mui/material/ListItemText';
6+
import List from '@mui/material/List';
7+
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
8+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
9+
import KeyIcon from '@mui/icons-material/VpnKey';
10+
import { useTheme } from '@mui/material';
1711

1812
const CryptographyMenu = ({
1913
handleIndexChange, selectedIndex, cryptography, file, text,
2014
}) => {
21-
const classes = useStyles();
15+
const theme = useTheme();
2216
const [openCollapse, setOpenCollapse] = useState(true);
2317

2418
/**
@@ -41,15 +35,19 @@ const CryptographyMenu = ({
4135
<ListItem
4236
selected={selectedIndex === 1}
4337
button
44-
className={classes.nested}
38+
sx={{
39+
paddingLeft: theme.spacing(4),
40+
}}
4541
onClick={() => handleIndexChange(1)}
4642
>
4743
<ListItemText inset primary={file} />
4844
</ListItem>
4945
<ListItem
5046
selected={selectedIndex === 2}
5147
button
52-
className={classes.nested}
48+
sx={{
49+
paddingLeft: theme.spacing(4),
50+
}}
5351
onClick={() => handleIndexChange(2)}
5452
>
5553
<ListItemText inset primary={text} />

0 commit comments

Comments
 (0)