Skip to content

Commit

Permalink
Merge pull request #59 from harry0000/feature-1_2_0
Browse files Browse the repository at this point in the history
Update version to 1.2.0: Add unit/equipment & Fix bugs
  • Loading branch information
harry0000 authored Feb 9, 2023
2 parents 4815815 + 3d18e74 commit d652c03
Show file tree
Hide file tree
Showing 62 changed files with 5,000 additions and 8,833 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
path: ~/.npm
node-version: 14

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
npm-run-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14

- name: Setup
run: npm install
Expand Down
13,036 changes: 4,446 additions & 8,590 deletions package-lock.json

Large diffs are not rendered by default.

49 changes: 25 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "last-origin-unit-viewer",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"license": "UNLICENSED",
"author": "harry0000 <https://github.com/harry0000>",
Expand Down Expand Up @@ -37,40 +37,41 @@
]
},
"dependencies": {
"@emotion/react": "^11.10.0",
"@emotion/react": "^11.10.5",
"@types/gtag.js": "0.0.12",
"@types/node": "^16.11.56",
"@types/react": "^17.0.48",
"@types/react-dom": "^17.0.17",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react-router-dom": "^5.3.3",
"@types/recoil": "0.0.9",
"bootstrap": "^4.6.2",
"fast-deep-equal": "^3.1.3",
"i18next": "^21.9.1",
"rdndmb-html5-to-touch": "^7.0.0-alpha.1",
"react": "^17.0.2",
"react-bootstrap": "^1.6.5",
"i18next": "^22.4.9",
"rdndmb-html5-to-touch": "^8.0.0",
"react": "^18.2.0",
"react-bootstrap": "^1.6.6",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-multi-backend": "^7.0.0-alpha.4",
"react-dnd-preview": "^7.0.0-alpha.3",
"react-dnd-multi-backend": "^8.0.0",
"react-dnd-preview": "^8.0.0",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^17.0.2",
"react-i18next": "^11.18.4",
"react-dom": "^18.2.0",
"react-i18next": "^12.1.4",
"react-router-dom": "^5.3.3",
"react-scripts": "^4.0.3",
"recoil": "^0.7.5",
"typescript": "^4.7.4"
"react-scripts": "^5.0.1",
"react-virtuoso": "^4.0.7",
"recoil": "^0.7.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"eslint": "^7.32.0",
"eslint-plugin-react": "^7.31.6",
"eslint-plugin-react-hooks": "^4.6.0"
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.4.0",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"eslint": "^8.33.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^4.9.5"
}
}
Binary file added public/equip_icon/gear_bloody_eyepatch_ss.webp
Binary file not shown.
Binary file added public/unit_icon/130.webp
Binary file not shown.
25 changes: 13 additions & 12 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { RecoilRoot } from 'recoil';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { act } from 'react-dom/test-utils';
import { render } from '@testing-library/react';

import App from './App';

import './i18n/config';

test('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(
<RecoilRoot>
<DndProvider backend={HTML5Backend}>
<App />
</DndProvider>
</RecoilRoot>,
div
);
ReactDOM.unmountComponentAtNode(div);
test('renders without crashing', async () => {
await act(() => {
render(
<RecoilRoot>
<DndProvider backend={HTML5Backend}>
<App/>
</DndProvider>
</RecoilRoot>,
);
});
});
6 changes: 4 additions & 2 deletions src/component/common/AutoFireButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/** @jsx jsx */
import { Theme, jsx } from '@emotion/react';
import { Interpolation } from '@emotion/serialize';
import React, { useEffect, useState } from 'react';
import React, { ReactNode, useEffect, useState } from 'react';

import { Button } from 'react-bootstrap';
import { ButtonVariant } from 'react-bootstrap/types';

Expand All @@ -29,7 +30,8 @@ const AutoFireButton: React.FC<{
css?: Interpolation<Theme>,
variant: ButtonVariant,
disabled: boolean,
onClick: () => void
onClick: () => void,
children: ReactNode
}> = ({ disabled, onClick, children, ...rest }) => {
const [prevDisabled, setPrevDisabled] = useState(disabled);
const [isMouseDown, setMouseDown] = useState(false);
Expand Down
Loading

0 comments on commit d652c03

Please sign in to comment.