Compare commits

..

9 Commits

Author SHA1 Message Date
bbe6207a25 Merge branch 'master' into dcpp-socket-status 2023-01-01 17:14:18 -08:00
a47b67c6c9 🖼️ Fixed the ThreeTwo favico 2023-01-01 17:08:12 -08:00
ddef87ea29 AirDC++ Connection Status (#53)
* 🔧 Fixed empty library state with explanation

* ️ Added a status indicator for the AirDC++ socket connection
2022-12-30 22:39:38 -08:00
c09ec6bcfe ️ Added a status indicator for the AirDC++ socket connection 2022-12-31 06:21:21 +00:00
71bad167ab 🔧 Library zero state (#52)
* 🔧 Refactoring uncompression methods on client-side

* ✏️ Refactoring

* 👁️ Updates to the comic viewer

* 🖼️ Added screenshots from December 2022

* ✏️ Fixed typo in README

* 🏗️ Massive refactor around archive uncompression for reading/analysis

* 🔧 Tweaked state vars for reading and analysis

* 🏗️ Refactor to support DC++ and socket.io integration

This refactor covers the following workflows:

1. Adding a comic from LOCG or ComicVine adds it to the wanted list
2. Downloading that comic from DC++ correctly adds download metadata to the corresponding comic object in mongo
3. Successful download triggers automatic import to library and cover extraction, metadata application
2022-12-29 15:55:33 -08:00
df1fbc7dd3 🔧 Fixed empty library state with explanation 2022-12-29 23:33:23 +00:00
789e5b9518 Merge branch 'master' of https://github.com/rishighan/threetwo 2022-12-21 21:49:42 -08:00
ce6653b5d7 🏗️ Applying the refactor patc 2022-12-21 21:49:12 -08:00
d065225d8e 🏗️ Refactoring archive uncompression for "Read Comic" and "Analysis" user flows (#46)
* 🔧 Refactoring uncompression methods on client-side

* ✏️ Refactoring

* 👁️ Updates to the comic viewer

* 🖼️ Added screenshots from December 2022

* ✏️ Fixed typo in README

* 🏗️ Massive refactor around archive uncompression for reading/analysis

* 🔧 Tweaked state vars for reading and analysis

* 🏗️ Refactor to support DC++ and socket.io integration

This refactor covers the following workflows:

1. Adding a comic from LOCG or ComicVine adds it to the wanted list
2. Downloading that comic from DC++ correctly adds download metadata to the corresponding comic object in mongo
3. Successful download triggers automatic import to library and cover extraction, metadata application
2022-12-21 21:17:38 -08:00
17 changed files with 57 additions and 27 deletions

View File

@@ -182,4 +182,4 @@
"resolutions": {
"@storybook/react/webpack": "^5"
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -349,4 +349,4 @@ export const analyzeImage =
type: IMG_ANALYSIS_DATA_FETCH_SUCCESS,
result: foo.data,
});
};
};

View File

@@ -137,4 +137,4 @@ export const App = (): ReactElement => {
);
};
export default App;
export default App;

View File

@@ -336,4 +336,4 @@ export const AcquisitionPanel = (
);
};
export default AcquisitionPanel;
export default AcquisitionPanel;

View File

@@ -317,4 +317,4 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => {
);
};
export default ComicDetail;
export default ComicDetail;

View File

@@ -94,4 +94,4 @@ RawFileDetails.propTypes = {
}),
}),
}),
};
};

View File

@@ -126,4 +126,4 @@ export const ArchiveOperations = (props): ReactElement => {
);
};
export default ArchiveOperations;
export default ArchiveOperations;

View File

@@ -94,4 +94,4 @@ export const Dashboard = (): ReactElement => {
);
};
export default Dashboard;
export default Dashboard;

View File

@@ -161,4 +161,4 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
);
};
export default PullList;
export default PullList;

View File

@@ -2,7 +2,6 @@ import React, { ReactElement } from "react";
import Card from "../Carda";
import { Link } from "react-router-dom";
import ellipsize from "ellipsize";
import { escapePoundSymbol } from "../../shared/utils/formatting.utils";
import { isEmpty, isNil, isUndefined, map } from "lodash";
import { detectIssueTypes } from "../../shared/utils/tradepaperback.utils";
import Masonry from "react-masonry-css";
@@ -52,7 +51,6 @@ export const RecentlyImported = ({
},
idx,
) => {
console.log(comicvine);
const { issueName, url } = determineCoverFile({
rawFileDetails,
comicvine,
@@ -64,7 +62,6 @@ export const RecentlyImported = ({
comicInfo,
locg,
});
console.log(name);
const isComicBookMetadataAvailable =
!isUndefined(comicvine) &&
!isUndefined(comicvine.volumeInformation);
@@ -146,4 +143,4 @@ export const RecentlyImported = ({
</Masonry>
</>
);
};
};

View File

@@ -208,14 +208,13 @@ export const Library = (): ReactElement => {
// ImportStatus.propTypes = {
// value: PropTypes.bool.isRequired,
// };
return (
<section className="container">
<div className="section">
<div className="header-area">
<h1 className="title">Library</h1>
</div>
{!isUndefined(searchResults.hits) && (
{!isEmpty(searchResults) ? (
<div>
<div className="library">
<T2Table
@@ -230,7 +229,25 @@ export const Library = (): ReactElement => {
/>
</div>
</div>
)}
): <div className="columns">
<div className="column is-two-thirds">
<article className="message is-link">
<div className="message-body">
No comics were found in the library, Elasticsearch reports no
indices. Try importing a few comics into the library and come
back.
</div>
</article>
<pre>
{!isUndefined(searchError.data) &&
JSON.stringify(
searchError.data.meta.body.error.root_cause,
null,
4,
)}
</pre>
</div>
</div> }
</div>
</section>
);

View File

@@ -1,15 +1,17 @@
import React from "react";
import React, { useContext } from "react";
import { SearchBar } from "./GlobalSearchBar/SearchBar";
import { DownloadProgressTick } from "./ComicDetail/DownloadProgressTick";
import { Link } from "react-router-dom";
import { useSelector } from "react-redux";
import { isUndefined } from "lodash";
import { isUndefined, isEmpty } from "lodash";
import { AirDCPPSocketContext } from "../context/AirDCPPSocket";
const Navbar: React.FunctionComponent = (props) => {
const downloadProgressTick = useSelector(
(state: RootState) => state.airdcpp.downloadProgressData,
);
const airDCPPConfiguration = useContext(AirDCPPSocketContext);
console.log(airDCPPConfiguration)
return (
<nav className="navbar is-fixed-top">
<div className="navbar-brand">
@@ -80,10 +82,23 @@ const Navbar: React.FunctionComponent = (props) => {
<div className="navbar-dropdown download-progress-meter">
<a className="navbar-item">
<DownloadProgressTick data={downloadProgressTick} />
</a>
</div>
</a> </div>
) : null}
</div>
{/* AirDC++ socket connection status */}
<div className="navbar-item has-dropdown is-hoverable">
<a className="navbar-link is-arrowless has-text-success">
{!isEmpty(airDCPPConfiguration.airDCPPState.socketConnectionInformation) ? (
<i className="fa-solid fa-bolt"></i>) : null}
</a>
<div className="navbar-dropdown download-progress-meter">
<a className="navbar-item">
<pre>{JSON.stringify(airDCPPConfiguration.airDCPPState.socketConnectionInformation, null, 2)}</pre>
</a>
</div>
</div>
<div className="navbar-item has-dropdown is-hoverable is-mega">
<div className="navbar-link flex">Blog</div>
<div id="blogDropdown" className="navbar-dropdown">

View File

@@ -137,4 +137,4 @@ export const SETTINGS_DB_FLUSH_SUCCESS = "SETTINGS_DB_FLUSH_SUCCESS";
// Metron Metadata
export const METRON_DATA_FETCH_SUCCESS = "METRON_DATA_FETCH_SUCCESS";
export const METRON_DATA_FETCH_IN_PROGRESS = "METRON_DATA_FETCH_IN_PROGRESS";
export const METRON_DATA_FETCH_ERROR = "METRON_DATA_FETCH_ERROR";
export const METRON_DATA_FETCH_ERROR = "METRON_DATA_FETCH_ERROR";

View File

@@ -12,7 +12,7 @@ const AirDCPPSocketContextProvider = ({ children }) => {
airDCPPState: {
settings: settingsObject,
socket: {},
socketConnectionInformation: {},
socketConectionInformation: {},
},
});
};
@@ -56,11 +56,12 @@ const AirDCPPSocketContextProvider = ({ children }) => {
hostname: `${host.hostname}:${host.port}`,
});
const socketConnectionInformation = await initializedAirDCPPSocket.connect(
let socketConnectionInformation = await initializedAirDCPPSocket.connect(
`${host.username}`,
`${host.password}`,
true,
);
persistSettings({
...airDCPPState,
airDCPPState: {
@@ -80,7 +81,7 @@ const AirDCPPSocketContextProvider = ({ children }) => {
};
const AirDCPPSocketContext = createContext({
airDCPPState: {},
saveSettings: () => {},
saveSettings: () => { },
});
export { AirDCPPSocketContext, AirDCPPSocketContextProvider };

View File

@@ -283,4 +283,4 @@ function fileOpsReducer(state = initialState, action) {
}
}
export default fileOpsReducer;
export default fileOpsReducer;

View File

@@ -90,4 +90,4 @@ export const determineExternalMetadata = (
default:
break;
}
};
};