Skip to content

Commit 21609cf

Browse files
authored
Merge pull request #56 from CodeDead/release/v2.2.1
Release/v2.2.1
2 parents 7f03b43 + 9059308 commit 21609cf

File tree

28 files changed

+5637
-8905
lines changed

28 files changed

+5637
-8905
lines changed

.eslintrc.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@
1212
"ecmaFeatures": {
1313
"jsx": true
1414
},
15-
"ecmaVersion": 12,
15+
"ecmaVersion": 13,
1616
"sourceType": "module"
1717
},
1818
"plugins": [
1919
"react"
2020
],
2121
"rules": {
22+
"react/function-component-definition": [
23+
2,
24+
{
25+
"namedComponents": "arrow-function",
26+
"unnamedComponents": "arrow-function"
27+
}
28+
],
2229
"react/prop-types": 0
2330
}
2431
}

.yarn/releases/yarn-3.0.2.cjs

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

.yarn/releases/yarn-3.1.1.cjs

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

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ plugins:
44
- path: .yarn/plugins/yarn-up-all-plugin.cjs
55
spec: "https://github.com/e5mode/yarn-up-all/releases/download/1.1.0/index.js"
66

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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/v2.2.0/total)
7+
![GitHub Releases (by Release)](https://img.shields.io/github/downloads/CodeDead/DeadHash-js/v2.2.1/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

package.json

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deadhash",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "File and text hash calculator",
55
"homepage": "./",
66
"private": true,
@@ -12,7 +12,7 @@
1212
"build": {
1313
"appId": "com.codedead.deadhash",
1414
"productName": "DeadHash",
15-
"copyright": "Copyright © 2021 ${author}",
15+
"copyright": "Copyright © 2022 ${author}",
1616
"win": {
1717
"target": [
1818
"nsis",
@@ -35,19 +35,19 @@
3535
},
3636
"main": "public/electron.js",
3737
"dependencies": {
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",
42-
"crc": "^3.8.0",
38+
"@emotion/react": "^11.7.1",
39+
"@emotion/styled": "^11.6.0",
40+
"@mui/icons-material": "^5.2.5",
41+
"@mui/material": "^5.2.7",
42+
"crc": "^4.1.0",
4343
"cross-env": "^7.0.3",
4444
"electron-is-dev": "^2.0.0",
4545
"react": "^17.0.2",
4646
"react-contexify": "^5.0.0",
4747
"react-dom": "^17.0.2",
48-
"react-router": "^5.2.1",
49-
"react-router-dom": "^5.3.0",
50-
"react-scripts": "^4.0.3"
48+
"react-router": "^6.2.1",
49+
"react-router-dom": "^6.2.1",
50+
"react-scripts": "^5.0.0"
5151
},
5252
"scripts": {
5353
"react-start": "react-scripts start",
@@ -72,15 +72,16 @@
7272
]
7373
},
7474
"devDependencies": {
75-
"concurrently": "^6.2.2",
76-
"electron": "^15.0.0",
77-
"electron-builder": "^22.11.7",
78-
"eslint": "^7.32.0",
79-
"eslint-config-airbnb": "^18.2.1",
80-
"eslint-plugin-import": "^2.24.2",
81-
"eslint-plugin-jsx-a11y": "^6.4.1",
82-
"eslint-plugin-react": "^7.26.1",
83-
"eslint-plugin-react-hooks": "^4.2.0",
75+
"concurrently": "^7.0.0",
76+
"electron": "^16.0.6",
77+
"electron-builder": "^22.14.5",
78+
"eslint": "^8.6.0",
79+
"eslint-config-airbnb": "^19.0.4",
80+
"eslint-plugin-import": "^2.25.4",
81+
"eslint-plugin-jsx-a11y": "^6.5.1",
82+
"eslint-plugin-react": "^7.28.0",
83+
"eslint-plugin-react-hooks": "^4.3.0",
8484
"wait-on": "^6.0.0"
85-
}
85+
},
86+
"packageManager": "yarn@3.1.1"
8687
}

src/components/App/index.jsx

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useContext, useEffect } from 'react';
2-
import { BrowserRouter, Switch, Route } from 'react-router-dom';
2+
import { BrowserRouter, Routes, Route } from 'react-router-dom';
33
import { CssBaseline } from '@mui/material';
44
import { createTheme, ThemeProvider } from '@mui/material/styles';
55
import ThemeSelector from '../../utils/ThemeSelector';
@@ -73,23 +73,13 @@ const App = () => {
7373
<DropZone enabled={enabled} onDrop={onDrop} reRoute="/file">
7474
<TopBar />
7575
<CssBaseline />
76-
<Switch>
77-
<Route path="/settings">
78-
<Settings />
79-
</Route>
80-
<Route path="/about">
81-
<About />
82-
</Route>
83-
<Route path="/file">
84-
<File />
85-
</Route>
86-
<Route path="/text">
87-
<Text />
88-
</Route>
89-
<Route path="/">
90-
<Home />
91-
</Route>
92-
</Switch>
76+
<Routes>
77+
<Route path="/settings" element={<Settings />} />
78+
<Route path="/about" element={<About />} />
79+
<Route path="/file" element={<File />} />
80+
<Route path="/text" element={<Text />} />
81+
<Route path="/" element={<Home />} />
82+
</Routes>
9383
</DropZone>
9484
</BrowserRouter>
9585
</ThemeProvider>

src/components/BackButton/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import React from 'react';
22
import Button from '@mui/material/Button';
33
import ArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
4-
import { useHistory } from 'react-router-dom';
4+
import { useNavigate } from 'react-router-dom';
55

66
const BackButton = () => {
7-
const history = useHistory();
7+
const navigate = useNavigate();
88
/**
99
* Call the goBack event
1010
* @param e The event argument
1111
*/
1212
const back = (e) => {
1313
if (e) e.preventDefault();
14-
history.goBack();
14+
navigate(-1);
1515
};
1616

1717
return (

src/components/DrawerBar/index.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import InfoIcon from '@mui/icons-material/Info';
1414
import BuildIcon from '@mui/icons-material/Build';
1515
import HelpIcon from '@mui/icons-material/Help';
1616
import CloseIcon from '@mui/icons-material/Close';
17-
import { useHistory } from 'react-router-dom';
17+
import { useNavigate } from 'react-router-dom';
1818
import CryptographyMenu from '../CryptographyMenu';
1919
import { MainContext } from '../../contexts/MainContextProvider';
2020

@@ -25,7 +25,7 @@ const DrawerBar = ({ open, onClose }) => {
2525
const language = state.languages[state.languageIndex];
2626
const selectedItem = state.selectedListItem;
2727

28-
const history = useHistory();
28+
const navigate = useNavigate();
2929
const theme = useTheme();
3030

3131
/**
@@ -45,22 +45,22 @@ const DrawerBar = ({ open, onClose }) => {
4545

4646
switch (index) {
4747
case 1:
48-
history.push('/file');
48+
navigate('/file');
4949
break;
5050
case 2:
51-
history.push('/text');
51+
navigate('/text');
5252
break;
5353
case 3:
54-
history.push('/settings');
54+
navigate('/settings');
5555
break;
5656
case 4:
5757
window.open('https://codedead.com/Software/DeadHash/help.pdf', '_blank');
5858
break;
5959
case 5:
60-
history.push('/about');
60+
navigate('/about');
6161
break;
6262
default:
63-
history.push('/');
63+
navigate('/');
6464
break;
6565
}
6666
};

src/components/DropZone/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
2-
import { useHistory } from 'react-router';
2+
import { useNavigate } from 'react-router';
33

44
const DropZone = ({
55
children, onDrop, enabled, reRoute,
66
}) => {
7-
const history = useHistory();
7+
const navigate = useNavigate();
88

99
/**
1010
* Event that is fired when one or more files are dropped
@@ -15,7 +15,7 @@ const DropZone = ({
1515
if (!enabled) return;
1616

1717
if (onDrop) onDrop(e.dataTransfer.files[0]);
18-
if (reRoute) history.push(reRoute);
18+
if (reRoute) navigate(reRoute);
1919
};
2020

2121
/**

src/contexts/CryptoContextReducer/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const CryptoContextProvider = ({ children }) => {
4949
const [state, dispatch] = useReducer(CryptoReducer, initState);
5050

5151
return (
52+
// eslint-disable-next-line react/jsx-no-constructed-context-values
5253
<CryptoContext.Provider value={[state, dispatch]}>
5354
{children}
5455
</CryptoContext.Provider>

src/contexts/MainContextProvider/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const MainContextProvider = ({ children }) => {
6464
const [state, dispatch] = useReducer(MainReducer, initState);
6565

6666
return (
67+
// eslint-disable-next-line react/jsx-no-constructed-context-values
6768
<MainContext.Provider value={[state, dispatch]}>
6869
{children}
6970
</MainContext.Provider>

src/languages/de_DE/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const de_DE = () => ({
77
help: 'Hilfe',
88
language: 'Sprache',
99
aboutSubtitle: 'Erfahren Sie mehr über DeadHash',
10-
aboutMessage: 'DeadHash wurde von DeadLine erstellt.\n\nEinige Bilder wurden von icons8 bereitgestellt: https://icons8.com\nLizenz: GPLv3\nVersion: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash wurde von DeadLine erstellt.\n\nEinige Bilder wurden von icons8 bereitgestellt: https://icons8.com\nLizenz: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Thema',
1313
general: 'Allgemeines',
@@ -54,7 +54,6 @@ const de_DE = () => ({
5454
cancel: 'Stornieren',
5555
ok: 'OK',
5656
errorTitle: 'Ein Fehler ist aufgetreten!',
57-
input: 'Eingabe',
5857
compare: 'Vergleichen',
5958
compareHash: 'Dein Hash hier',
6059
calculate: 'Berechnung',

src/languages/en_US/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const en_US = () => ({
77
help: 'Help',
88
language: 'Language',
99
aboutSubtitle: 'Learn more about DeadHash',
10-
aboutMessage: 'DeadHash was created by DeadLine.\n\nSome images were provided by icons8: https://icons8.com\nLicense: GPLv3\nVersion: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash was created by DeadLine.\n\nSome images were provided by icons8: https://icons8.com\nLicense: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Theme',
1313
general: 'General',
@@ -54,7 +54,6 @@ const en_US = () => ({
5454
cancel: 'Cancel',
5555
ok: 'OK',
5656
errorTitle: 'An error occurred!',
57-
input: 'Input',
5857
compare: 'Compare',
5958
compareHash: 'Your hash here',
6059
calculate: 'Calculate',

src/languages/es_ES/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const es_ES = () => ({
77
help: 'Ayuda',
88
language: 'Idioma',
99
aboutSubtitle: 'Obtenga más información sobre DeadHash',
10-
aboutMessage: 'DeadHash fue creado por DeadLine.\n\nAlgunas imágenes fueron proporcionadas por icons8: https://icons8.com\nLicencia: GPLv3\nVersión: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash fue creado por DeadLine.\n\nAlgunas imágenes fueron proporcionadas por icons8: https://icons8.com\nLicencia: GPLv3\nVersión: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Tema',
1313
general: 'General',
@@ -54,7 +54,6 @@ const es_ES = () => ({
5454
cancel: 'Cancelar',
5555
ok: 'Bueno',
5656
errorTitle: '¡Ocurrió un error!',
57-
input: 'Entrada',
5857
compare: 'Comparar',
5958
compareHash: 'Tu hash aquí',
6059
calculate: 'Calcular',

src/languages/fr_FR/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const fr_FR = () => ({
77
help: 'Aide',
88
language: 'Langue',
99
aboutSubtitle: 'En savoir plus sur DeadHash',
10-
aboutMessage: 'DeadHash a été créé par DeadLine.\n\nCertaines images ont été fournies par icons8: https://icons8.com\nLicence: GPLv3\nVersion: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash a été créé par DeadLine.\n\nCertaines images ont été fournies par icons8: https://icons8.com\nLicence: GPLv3\nVersion: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Thème',
1313
general: 'Général',
@@ -54,7 +54,6 @@ const fr_FR = () => ({
5454
cancel: 'Annuler',
5555
ok: 'OK',
5656
errorTitle: 'Une erreur est survenue!',
57-
input: 'Données d\'entrée',
5857
compare: 'Comparer',
5958
compareHash: 'Votre hachage ici',
6059
calculate: 'Calculer',

src/languages/it_IT/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const it_IT = () => ({
77
help: 'Aiuto',
88
language: 'Linguaggio',
99
aboutSubtitle: 'Ulteriori informazioni su DeadHash',
10-
aboutMessage: 'DeadHash è stato creato da DeadLine.\n\nAlcune immagini sono state fornite da icons8: https://icons8.com\nLicenza: GPLv3\nVersione: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash è stato creato da DeadLine.\n\nAlcune immagini sono state fornite da icons8: https://icons8.com\nLicenza: GPLv3\nVersione: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Tema',
1313
general: 'Generale',
@@ -54,7 +54,6 @@ const it_IT = () => ({
5454
cancel: 'Annulla',
5555
ok: 'OK',
5656
errorTitle: 'Si è verificato un errore!',
57-
input: 'Ingresso',
5857
compare: 'Confrontare',
5958
compareHash: 'Il tuo hash qui',
6059
calculate: 'Calcolare',

src/languages/jp_JP/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const jp_JP = () => ({
77
help: '助けて',
88
language: '言語',
99
aboutSubtitle: 'DeadHashの詳細',
10-
aboutMessage: 'DeadHashはDeadLineによって作成されました。\n\n一部の画像は、icons8によって提供されました:https://icons8.com\nライセンス:GPLv3\nバージョン:{x}\n\n著作権©2021 CodeDead',
10+
aboutMessage: 'DeadHashはDeadLineによって作成されました。\n\n一部の画像は、icons8によって提供されました:https://icons8.com\nライセンス:GPLv3\nバージョン:{x}\n\n著作権©2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'テーマ',
1313
general: '全般',
@@ -54,7 +54,6 @@ const jp_JP = () => ({
5454
cancel: 'キャンセル',
5555
ok: 'オーケー',
5656
errorTitle: 'エラーが発生しました!',
57-
input: '入力',
5857
compare: '比較する',
5958
compareHash: 'ここにあなたのハッシュ',
6059
calculate: '計算する',

src/languages/nl_NL/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const nl_NL = () => ({
77
help: 'Help',
88
language: 'Taal',
99
aboutSubtitle: 'Leer meer over DeadHash',
10-
aboutMessage: 'DeadHash werd gemaakt door DeadLine.\n\nSommige afbeeldingen werden afgeleverd door icons8: https://icons8.com\nLicentie: GPLv3\nVersie: {x}\n\nCopyright © 2021 CodeDead',
10+
aboutMessage: 'DeadHash werd gemaakt door DeadLine.\n\nSommige afbeeldingen werden afgeleverd door icons8: https://icons8.com\nLicentie: GPLv3\nVersie: {x}\n\nCopyright © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Thema',
1313
general: 'Algemeen',
@@ -54,7 +54,6 @@ const nl_NL = () => ({
5454
cancel: 'Annuleren',
5555
ok: 'OK',
5656
errorTitle: 'Er is een fout opgetreden!',
57-
input: 'Input',
5857
compare: 'Vergelijken',
5958
compareHash: 'Jouw hash hier',
6059
calculate: 'Bereken',

src/languages/pt_PT/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const pt_PT = () => ({
77
help: 'Socorro',
88
language: 'Língua',
99
aboutSubtitle: 'Saiba mais sobre o DeadHash',
10-
aboutMessage: 'DeadHash foi criado por DeadLine.\n\nAlgumas imagens foram fornecidas por icons8: https://icons8.com\nLicença: GPLv3\nVersão: {x}\n\nDireitos autorais © 2021 CodeDead',
10+
aboutMessage: 'DeadHash foi criado por DeadLine.\n\nAlgumas imagens foram fornecidas por icons8: https://icons8.com\nLicença: GPLv3\nVersão: {x}\n\nDireitos autorais © 2022 CodeDead',
1111
codedead: 'CodeDead',
1212
theme: 'Tema',
1313
general: 'Geral',
@@ -54,7 +54,6 @@ const pt_PT = () => ({
5454
cancel: 'Cancelar',
5555
ok: 'OK',
5656
errorTitle: 'Um erro ocorreu!',
57-
input: 'Entrada',
5857
compare: 'Comparar',
5958
compareHash: 'Seu hash aqui',
6059
calculate: 'Calcular',

0 commit comments

Comments
 (0)