AirDC++ Connection Status (#53)
* 🔧 Fixed empty library state with explanation * ⚡️ Added a status indicator for the AirDC++ socket connection
This commit was merged in pull request #53.
This commit is contained in:
@@ -51,7 +51,6 @@ export const RecentlyImported = ({
|
||||
},
|
||||
idx,
|
||||
) => {
|
||||
console.log(comicvine);
|
||||
const { issueName, url } = determineCoverFile({
|
||||
rawFileDetails,
|
||||
comicvine,
|
||||
@@ -63,7 +62,6 @@ export const RecentlyImported = ({
|
||||
comicInfo,
|
||||
locg,
|
||||
});
|
||||
console.log(name);
|
||||
const isComicBookMetadataAvailable =
|
||||
!isUndefined(comicvine) &&
|
||||
!isUndefined(comicvine.volumeInformation);
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -84,6 +84,14 @@ const Navbar: React.FunctionComponent = (props) => {
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{/* AirDC++ socket connection status */}
|
||||
<div className="navbar-item has-dropdown is-hoverable">
|
||||
<a className="navbar-link is-arrowless">
|
||||
<i className="fa-solid fa-bolt"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="navbar-item has-dropdown is-hoverable is-mega">
|
||||
<div className="navbar-link flex">Blog</div>
|
||||
<div id="blogDropdown" className="navbar-dropdown">
|
||||
|
||||
@@ -12,7 +12,7 @@ const AirDCPPSocketContextProvider = ({ children }) => {
|
||||
airDCPPState: {
|
||||
settings: settingsObject,
|
||||
socket: {},
|
||||
socketConnectionInformation: {},
|
||||
socketConectionInformation: {},
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -55,7 +55,6 @@ const AirDCPPSocketContextProvider = ({ children }) => {
|
||||
protocol: `${host.protocol}`,
|
||||
hostname: `${host.hostname}:${host.port}`,
|
||||
});
|
||||
|
||||
const socketConnectionInformation = await initializedAirDCPPSocket.connect(
|
||||
`${host.username}`,
|
||||
`${host.password}`,
|
||||
@@ -80,7 +79,7 @@ const AirDCPPSocketContextProvider = ({ children }) => {
|
||||
};
|
||||
const AirDCPPSocketContext = createContext({
|
||||
airDCPPState: {},
|
||||
saveSettings: () => {},
|
||||
saveSettings: () => { },
|
||||
});
|
||||
|
||||
export { AirDCPPSocketContext, AirDCPPSocketContextProvider };
|
||||
|
||||
Reference in New Issue
Block a user