Skip to content

Commit

Permalink
Merge pull request #53 from CodeDead/release/v2.2.0
Browse files Browse the repository at this point in the history
Release/v2.2.0
  • Loading branch information
CodeDead authored Oct 1, 2021
2 parents dac12f6 + f27d05c commit 7f03b43
Show file tree
Hide file tree
Showing 32 changed files with 3,797 additions and 2,943 deletions.
2 changes: 1 addition & 1 deletion .yarn/plugins/yarn-up-all-plugin.cjs
Original file line number Diff line number Diff line change
@@ -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]}}};
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]}}};
55 changes: 0 additions & 55 deletions .yarn/releases/yarn-2.4.2.cjs

This file was deleted.

631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ nodeLinker: node-modules

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

yarnPath: .yarn/releases/yarn-2.4.2.cjs
yarnPath: .yarn/releases/yarn-3.0.2.cjs
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
![DeadHash](https://i.imgur.com/PWrqQ67.png)
![DeadHash](https://i.imgur.com/CkzWk7u.png)

# DeadHash

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

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

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

## Building

In order to produce binary distributable files or to start a development build, you must first issue the following command,
in order to ensure that the React build is up-to-date:
```
yarn react-build
```

After running `yarn react-build`, you can issue the following command in order to produce the binary distributable files:
```
In order to produce binary distributable files, you must issue the following command:
```shell
yarn build
```

If you want to start the development version, you can issue the following command, after running `yarn react-build`:
```
If you want to start the development version, you can issue the following command:
```shell
yarn start
```

Expand Down
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deadhash",
"version": "2.1.3",
"version": "2.2.0",
"description": "File and text hash calculator",
"homepage": "./",
"private": true,
Expand Down Expand Up @@ -35,16 +35,18 @@
},
"main": "public/electron.js",
"dependencies": {
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": "^5.0.1",
"@mui/material": "^5.0.2",
"crc": "^3.8.0",
"cross-env": "^7.0.3",
"electron-is-dev": "^2.0.0",
"react": "^17.0.2",
"react-contexify": "^5.0.0",
"react-dom": "^17.0.2",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"react-scripts": "^4.0.3"
},
"scripts": {
Expand All @@ -55,7 +57,7 @@
"electron-build": "electron-builder",
"release": "yarn react-build && electron-builder -wl --publish=always",
"build": "yarn react-build && yarn electron-build -wl",
"start": "concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\""
"start": "yarn react-build && concurrently \"cross-env BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electron .\""
},
"browserslist": {
"production": [
Expand All @@ -70,15 +72,15 @@
]
},
"devDependencies": {
"concurrently": "^6.2.0",
"electron": "^13.1.1",
"electron-builder": "^22.10.5",
"eslint": "^7.28.0",
"concurrently": "^6.2.2",
"electron": "^15.0.0",
"electron-builder": "^22.11.7",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"wait-on": "^5.3.0"
"wait-on": "^6.0.0"
}
}
12 changes: 6 additions & 6 deletions src/components/AlertDialog/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from 'react';
import DialogTitle from '@material-ui/core/DialogTitle';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogActions from '@material-ui/core/DialogActions';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogActions from '@mui/material/DialogActions';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';

const AlertDialog = ({
title, content, ok, onClose,
Expand Down
18 changes: 9 additions & 9 deletions src/components/App/index.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React, { useContext, useEffect } from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import { CssBaseline } from '@material-ui/core';
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import Home from '../../routes/Home';
import Settings from '../../routes/Settings';
import { CssBaseline } from '@mui/material';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import ThemeSelector from '../../utils/ThemeSelector';
import TopBar from '../TopBar';
import About from '../../routes/About';
import File from '../../routes/File';
import Text from '../../routes/Text';
import DropZone from '../DropZone';
import { MainContext } from '../../contexts/MainContextProvider';
import { CryptoContext } from '../../contexts/CryptoContextReducer';
Expand All @@ -18,6 +13,11 @@ import {
setFileHashes,
setFileHashLoading, setTextHashError, setTextHashes, setTextHashLoading,
} from '../../reducers/CryptoReducer/Actions';
import Home from '../../routes/Home';
import Text from '../../routes/Text';
import File from '../../routes/File';
import About from '../../routes/About';
import Settings from '../../routes/Settings';

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

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

const color = ThemeSelector(themeIndex);

const theme = createMuiTheme({
const theme = createTheme({
palette: {
primary: color,
type: themeStyle,
mode: themeStyle,
},
});

Expand Down
15 changes: 10 additions & 5 deletions src/components/BackButton/index.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import React from 'react';
import Button from '@material-ui/core/Button';
import ArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft';
import Button from '@mui/material/Button';
import ArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
import { useHistory } from 'react-router-dom';

const BackButton = ({ goBack }) => {
const BackButton = () => {
const history = useHistory();
/**
* Call the goBack event
* @param e The event argument
*/
const back = (e) => {
if (e) e.preventDefault();
if (goBack) goBack();
history.goBack();
};

return (
<Button color="primary" onClick={back}>
<Button
onClick={back}
size="small"
>
<ArrowLeftIcon />
</Button>
);
Expand Down
45 changes: 45 additions & 0 deletions src/components/CompareField/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React from 'react';
import TextField from '@mui/material/TextField';
import CopyPasteMenu from '../CopyPasteMenu';

const CompareField = ({
copyLabel, pasteLabel, onPaste, compareLabel, value, onChange,
}) => {
/**
* Paste data
*/
const paste = () => {
if (onPaste) {
onPaste();
}
};

/**
* Change the value
* @param e The event argument
*/
const changeValue = (e) => {
if (onChange) {
onChange(e.target.value);
}
};

return (
<CopyPasteMenu
id={1}
copyData={() => navigator.clipboard.writeText(value)}
copy={copyLabel}
paste={pasteLabel}
pasteData={paste}
>
<TextField
fullWidth
value={value}
onChange={changeValue}
label={compareLabel}
/>
</CopyPasteMenu>
);
};

export default CompareField;
16 changes: 8 additions & 8 deletions src/components/ConfirmationDialog/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import Dialog from '@material-ui/core/Dialog';
import DialogTitle from '@material-ui/core/DialogTitle';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogActions from '@material-ui/core/DialogActions';
import Button from '@material-ui/core/Button';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogActions from '@mui/material/DialogActions';
import Button from '@mui/material/Button';

const ConfirmationDialog = ({
open, title, content, onAccept, onCancel, onClose, yes, no,
Expand Down Expand Up @@ -46,10 +46,10 @@ const ConfirmationDialog = ({
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={cancel} color="primary">
<Button onClick={cancel}>
{no}
</Button>
<Button onClick={accept} color="primary" autoFocus>
<Button onClick={accept} autoFocus>
{yes}
</Button>
</DialogActions>
Expand Down
4 changes: 2 additions & 2 deletions src/components/CopyPasteMenu/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Item, Menu, useContextMenu } from 'react-contexify';
import CopyIcon from '@material-ui/icons/FileCopy';
import PasteIcon from '@material-ui/icons/Assignment';
import CopyIcon from '@mui/icons-material/FileCopy';
import PasteIcon from '@mui/icons-material/Assignment';

const CopyPasteMenu = ({
id, children, copyData, pasteData, copy, paste,
Expand Down
34 changes: 16 additions & 18 deletions src/components/CryptographyMenu/index.jsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import ListItem from '@material-ui/core/ListItem';
import Collapse from '@material-ui/core/Collapse';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import List from '@material-ui/core/List';
import ExpandLessIcon from '@material-ui/icons/ExpandLess';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import KeyIcon from '@material-ui/icons/VpnKey';

const useStyles = makeStyles((theme) => ({
nested: {
paddingLeft: theme.spacing(4),
},
}));
import ListItem from '@mui/material/ListItem';
import Collapse from '@mui/material/Collapse';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import List from '@mui/material/List';
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import KeyIcon from '@mui/icons-material/VpnKey';
import { useTheme } from '@mui/material';

const CryptographyMenu = ({
handleIndexChange, selectedIndex, cryptography, file, text,
}) => {
const classes = useStyles();
const theme = useTheme();
const [openCollapse, setOpenCollapse] = useState(true);

/**
Expand All @@ -41,15 +35,19 @@ const CryptographyMenu = ({
<ListItem
selected={selectedIndex === 1}
button
className={classes.nested}
sx={{
paddingLeft: theme.spacing(4),
}}
onClick={() => handleIndexChange(1)}
>
<ListItemText inset primary={file} />
</ListItem>
<ListItem
selected={selectedIndex === 2}
button
className={classes.nested}
sx={{
paddingLeft: theme.spacing(4),
}}
onClick={() => handleIndexChange(2)}
>
<ListItemText inset primary={text} />
Expand Down
Loading

0 comments on commit 7f03b43

Please sign in to comment.