🧹 UI cleanup and removal of unused packages

This commit is contained in:
2021-06-09 08:53:16 -07:00
parent 0d6eb0d980
commit 1cfe2b215d
6 changed files with 21 additions and 28 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ node_modules/
src/**/*.jsx src/**/*.jsx
tests/__coverage__/ tests/__coverage__/
tests/**/*.jsx tests/**/*.jsx
src/client/assets/scss/App.css.map

View File

@@ -35,8 +35,6 @@
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"react-hooks-worker": "^1.0.0", "react-hooks-worker": "^1.0.0",
"react-virtualized-auto-sizer": "^1.0.5",
"react-window": "^1.8.6",
"react-window-dynamic-list": "^2.3.5", "react-window-dynamic-list": "^2.3.5",
"request": "^2.88.2", "request": "^2.88.2",
"sharp": "^0.28.1", "sharp": "^0.28.1",
@@ -61,7 +59,6 @@
"@types/react": "^17.0.3", "@types/react": "^17.0.3",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"@types/react-redux": "^7.1.16", "@types/react-redux": "^7.1.16",
"@types/react-syntax-highlighter": "^13.5.0",
"@types/unzipper": "^0.10.3", "@types/unzipper": "^0.10.3",
"@typescript-eslint/eslint-plugin": "^4.17.0", "@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0", "@typescript-eslint/parser": "^4.17.0",

View File

@@ -16305,6 +16305,7 @@ readers do not read off random characters that represent icons */
.min .tags { .min .tags {
display: inline; display: inline;
margin-right: 5px; margin-right: 5px;
margin-left: 5px;
} }
.min .tags:first-child { .min .tags:first-child {
margin-left: 0; margin-left: 0;

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,7 @@ import { connect } from "react-redux";
import { fetchComicBookMetadata } from "../actions/fileops.actions"; import { fetchComicBookMetadata } from "../actions/fileops.actions";
import { IFolderData } from "../shared/interfaces/comicinfo.interfaces"; import { IFolderData } from "../shared/interfaces/comicinfo.interfaces";
import Card from "./Card"; import Card from "./Card";
import { Collapse } from "react-collapse";
import { io, Socket } from "socket.io-client"; import { io, Socket } from "socket.io-client";
import { SOCKET_BASE_URI } from "../constants/endpoints"; import { SOCKET_BASE_URI } from "../constants/endpoints";
import DynamicList, { createCache } from "react-window-dynamic-list"; import DynamicList, { createCache } from "react-window-dynamic-list";
@@ -12,7 +13,7 @@ interface IProps {
matches: unknown; matches: unknown;
fetchComicMetadata: any; fetchComicMetadata: any;
path: string; path: string;
garam: any; covers: any;
} }
interface IState { interface IState {
folderWalkResults?: Array<IFolderData>; folderWalkResults?: Array<IFolderData>;
@@ -49,26 +50,32 @@ class Import extends React.Component<IProps, IState> {
}; };
public cache = createCache(); public cache = createCache();
public renderRow = ({ index, style }) => ( public renderRow = ({ index, style }) => (
<div style={style} className="min is-size-7"> <div style={style} className="min is-size-7">
<span className="tag is-dark">{index}</span> <span className="tag is-light">{index}</span>
<div className="tags has-addons"> <div className="tags has-addons">
<span className="tag is-success">cover</span> <span className="tag is-success">cover</span>
<span className="tag is-success is-light"> <span className="tag is-success is-light">
{this.props.garam[index].comicBookCoverMetadata.name} {this.props.covers[index].comicBookCoverMetadata.name}
</span> </span>
</div> </div>
imported from imported from
<div className="tags has-addons"> <div className="tags has-addons">
<span className="tag is-success">path</span> <span className="tag is-success">path</span>
<span className="tag is-success is-light"> <span className="tag is-success is-light">
{this.props.garam[index].comicBookCoverMetadata.path} {this.props.covers[index].comicBookCoverMetadata.path}
</span> </span>
</div> </div>
<div className="db-import-result-panel">
<pre className="has-background-success-light"> <pre className="has-background-success-light">
{JSON.stringify(this.props.garam[index].dbImportResult, null, 2)} <span className="icon">
<i className="fas fa-database"></i>
</span>
{JSON.stringify(this.props.covers[index].dbImportResult, null, 2)}
</pre> </pre>
</div> </div>
</div>
); );
public render() { public render() {
@@ -82,14 +89,14 @@ class Import extends React.Component<IProps, IState> {
<p className="mb-2"> <p className="mb-2">
<span className="tag is-medium is-info is-light"> <span className="tag is-medium is-info is-light">
Import Only Import Only
</span>{" "} </span>
will add comics identified from the mapped folder into the local will add comics identified from the mapped folder into the local
db. db.
</p> </p>
<p> <p>
<span className="tag is-medium is-info is-light"> <span className="tag is-medium is-info is-light">
Import and Tag Import and Tag
</span>{" "} </span>
will scan the ComicVine, shortboxed APIs and import comics from will scan the ComicVine, shortboxed APIs and import comics from
the mapped folder with the additional metadata. the mapped folder with the additional metadata.
</p> </p>
@@ -118,7 +125,7 @@ class Import extends React.Component<IProps, IState> {
<div> <div>
{/* <Card comicBookCoversMetadata={this.props.garam} /> */} {/* <Card comicBookCoversMetadata={this.props.garam} /> */}
<DynamicList <DynamicList
data={this.props.garam} data={this.props.covers}
cache={this.cache} cache={this.cache}
height={1000} height={1000}
width={"100%"} width={"100%"}
@@ -137,7 +144,7 @@ function mapStateToProps(state: IState) {
console.log("state", state); console.log("state", state);
return { return {
// matches: state.comicInfo.searchResults, // matches: state.comicInfo.searchResults,
garam: state.fileOps.comicBookMetadata, covers: state.fileOps.comicBookMetadata,
}; };
} }

View File

@@ -1895,13 +1895,6 @@
"@types/history" "*" "@types/history" "*"
"@types/react" "*" "@types/react" "*"
"@types/react-syntax-highlighter@^13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-13.5.0.tgz#b93c05f28844e7c35a5f1d38d3819099ffa82fbd"
integrity sha512-U7DrUaQRv3b+fsbPXMf7vC21K7DOkdNCQtp14Wm0Z5YLI9fPhndN4YTZ9eVXwmAivIg6lZ3YBVtGYucAS3H76A==
dependencies:
"@types/react" "*"
"@types/react-window@^1.8.2": "@types/react-window@^1.8.2":
version "1.8.3" version "1.8.3"
resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.3.tgz#14f74b144b4e3df9421eb31182dc580b7ccc7617" resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.3.tgz#14f74b144b4e3df9421eb31182dc580b7ccc7617"
@@ -10248,11 +10241,6 @@ react-router@5.2.0, react-router@^5.2.0:
tiny-invariant "^1.0.2" tiny-invariant "^1.0.2"
tiny-warning "^1.0.0" tiny-warning "^1.0.0"
react-virtualized-auto-sizer@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/react-virtualized-auto-sizer/-/react-virtualized-auto-sizer-1.0.5.tgz#9eeeb8302022de56fbd7a860b08513120ce36509"
integrity sha512-kivjYVWX15TX2IUrm8F1jaCEX8EXrpy3DD+u41WGqJ1ZqbljWpiwscV+VxOM1l7sSIM1jwi2LADjhhAJkJ9dxA==
react-window-dynamic-list@^2.3.5: react-window-dynamic-list@^2.3.5:
version "2.3.5" version "2.3.5"
resolved "https://registry.yarnpkg.com/react-window-dynamic-list/-/react-window-dynamic-list-2.3.5.tgz#f9c72a3e191c0b3ce907f79628d689bef2befd3c" resolved "https://registry.yarnpkg.com/react-window-dynamic-list/-/react-window-dynamic-list-2.3.5.tgz#f9c72a3e191c0b3ce907f79628d689bef2befd3c"
@@ -10262,7 +10250,7 @@ react-window-dynamic-list@^2.3.5:
lodash.debounce "^4.0.8" lodash.debounce "^4.0.8"
react-window "^1.8.5" react-window "^1.8.5"
react-window@^1.8.5, react-window@^1.8.6: react-window@^1.8.5:
version "1.8.6" version "1.8.6"
resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.6.tgz#d011950ac643a994118632665aad0c6382e2a112" resolved "https://registry.yarnpkg.com/react-window/-/react-window-1.8.6.tgz#d011950ac643a994118632665aad0c6382e2a112"
integrity sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg== integrity sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg==