diff --git a/README.md b/README.md index 94b9f71..b8d9e7d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo In the project directory, you can run: -### `npm deploy` +### `npm run deploy` deploys script to github pages diff --git a/src/App.css b/src/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/App.js b/src/App.js deleted file mode 100644 index 5c6d683..0000000 --- a/src/App.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; -import SignIn from './SignIn'; - -function App() { - return ( -
- -
- ); -} - -export default App; diff --git a/src/App.test.js b/src/App.test.js deleted file mode 100644 index 4db7ebc..0000000 --- a/src/App.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - const { getByText } = render(); - const linkElement = getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/ChecksumResolver.js b/src/ChecksumResolver.js index c0049a1..fbf0da9 100644 --- a/src/ChecksumResolver.js +++ b/src/ChecksumResolver.js @@ -17,6 +17,7 @@ import FileCopyOutlined from '@material-ui/icons/FileCopyOutlined'; import { CopyToClipboard } from 'react-copy-to-clipboard'; +import { Accordion, AccordionItem } from 'react-sanfona'; const useStyles = theme => ({ @@ -63,7 +64,7 @@ class ChecksumResolver extends React.Component { root: { marginRight: 8, "& .MuiInputBase-root.Mui-disabled": { - color: "rgba(0, 0, 0, 0.6)" + color: "rgba(0, 0, 0, 0.6)" } } })(TextField); @@ -83,9 +84,9 @@ class ChecksumResolver extends React.Component { return testResults; } - isInputInvalid = ()=>{ + isInputInvalid = () => { const { checksum } = this.state; - if(!checksum || checksum === ''){ + if (!checksum || checksum === '') { return false; } return !this.isChecksumValid(); @@ -94,9 +95,7 @@ class ChecksumResolver extends React.Component { requestActivationBytes = () => { const { checksum } = this.state; - // fetch("https://aaxactivationserviceapi.azurewebsites.net/api/v2/activation/" + checksum) - // fetch("https://localhost:32768/api/v2/activation/" + checksum) - fetch("https://aax.api.j-kit.me/api/v2/activation/" + checksum) + fetch("https://aax.api.j-kit.me/api/v2/activation/" + checksum) .then(res => res.json()) .then( (result) => { @@ -121,10 +120,10 @@ class ChecksumResolver extends React.Component { acceptFile = async files => { const file = files[0]; - if (!file.name.endsWith(".aax")) { - alert('FileType not supported!'); - return; - } + // if (!file.name.toLowerCase().endsWith(".aax")) { + // alert('FileType not supported!'); + // return; + // } const slic = file.slice(653, 653 + 20); const results = this.buf2hex(await slic.arrayBuffer()); @@ -136,6 +135,7 @@ class ChecksumResolver extends React.Component { render() { const { classes } = this.props; const { checksum, activationBytes } = this.state; + //const acc = accAX(); return ( @@ -224,6 +224,18 @@ class ChecksumResolver extends React.Component { + + + {[1, 2, 3, 4, 5].map(item => { + return ( + +
+ {`Item ${item} content`} +
+
+ ); + })} +
); } diff --git a/src/SignIn.js b/src/SignIn.js deleted file mode 100644 index ea42512..0000000 --- a/src/SignIn.js +++ /dev/null @@ -1,123 +0,0 @@ -import React, { useState } from 'react'; -import { withStyles } from "@material-ui/core/styles"; -import Avatar from '@material-ui/core/Avatar'; -import Button from '@material-ui/core/Button'; -import CssBaseline from '@material-ui/core/CssBaseline'; -import TextField from '@material-ui/core/TextField'; - -import Link from '@material-ui/core/Link'; -import Box from '@material-ui/core/Box'; -import LockOutlinedIcon from '@material-ui/icons/LockOutlined'; -import Typography from '@material-ui/core/Typography'; -import { makeStyles } from '@material-ui/core/styles'; -import Container from '@material-ui/core/Container'; - -function Copyright() { - return ( - - {'Copyright © '} - - Your Website - {' '} - {new Date().getFullYear()} - {'.'} - - ); -} - -const useStyles = makeStyles((theme) => ({ - paper: { - marginTop: theme.spacing(8), - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - }, - avatar: { - margin: theme.spacing(1), - backgroundColor: theme.palette.secondary.main, - }, - form: { - width: '100%', // Fix IE 11 issue. - marginTop: theme.spacing(1), - } - -})); - -const DarkerDisabledTextField = withStyles({ - root: { - marginRight: 8, - "& .MuiInputBase-root.Mui-disabled": { - color: "rgba(0, 0, 0, 0.6)" // (default alpha is 0.38) - } - } -})(TextField); - -export default function SignIn() { - const classes = useStyles(); - - const [checksumValue, setChecksumValue] = useState(""); - - return ( - - {/*
-

You clicked {count} times

- -
*/} - -
- - - - - AAX Checksum Resolver - -
- setChecksumValue(x.target.value)} - /> - - - - - - -
- - - -
- ); -} diff --git a/src/index.js b/src/index.js index a93e7d3..54c5350 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; -import App from './App'; import * as serviceWorker from './serviceWorker'; import ChecksumResolver from './ChecksumResolver';