@@ -106,7 +106,7 @@ const Navbar: React.FunctionComponent = (props) => {
Downloads
-
Search ComicVine
@@ -119,52 +119,22 @@ const Navbar: React.FunctionComponent = (props) => {
- {!isUndefined(libraryQueueImportStatus) &&
- location.hash !== "#/import" ? (
-
- ) : null}
-
{/* AirDC++ socket connection status */}
- {airDCPPSocketConnectionStatus ? (
+ {airDCPPSocketConnected ? (
<>
@@ -176,7 +146,7 @@ const Navbar: React.FunctionComponent = (props) => {
Last login was{" "}
{format(
- fromUnixTime(airDCPPSessionInfo.user.last_login),
+ fromUnixTime(airDCPPSessionInformation.user.last_login),
"dd MMMM, yyyy",
)}
@@ -184,15 +154,15 @@ const Navbar: React.FunctionComponent = (props) => {
- {airDCPPSessionInfo.user.username}
+ {airDCPPSessionInformation.user.username}
connected to{" "}
- {airDCPPSessionInfo.system_info.client_version}
+ {airDCPPSessionInformation.system_info.client_version}
{" "}
with session ID{" "}
- {airDCPPSessionInfo.session_id}
+ {airDCPPSessionInformation.session_id}
@@ -205,9 +175,7 @@ const Navbar: React.FunctionComponent = (props) => {
-
- {JSON.stringify(socketDisconnectionReason, null, 2)}
-
+
{JSON.stringify(airDCPPDisconnectionInfo, null, 2)}
>
)}
diff --git a/src/client/index.tsx b/src/client/index.tsx
index 16f5cf0..63a9d14 100644
--- a/src/client/index.tsx
+++ b/src/client/index.tsx
@@ -4,6 +4,7 @@ import { createRoot } from "react-dom/client";
import App from "./components/App";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Settings from "./components/Settings/Settings";
+import { ErrorPage } from "./components/shared/ErrorPage";
const rootEl = document.getElementById("root");
const root = createRoot(rootEl);
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
@@ -15,10 +16,8 @@ const router = createBrowserRouter([
{
path: "/",
element:
,
- },
- {
- path: "/settings",
- element:
,
+ errorElement:
,
+ children: [{ path: "settings", element:
}],
},
]);
diff --git a/src/client/store/index.ts b/src/client/store/index.ts
index 5f9a57c..a14851f 100644
--- a/src/client/store/index.ts
+++ b/src/client/store/index.ts
@@ -9,7 +9,7 @@ export const useStore = create((set, get) => ({
airDCPPSocketConnected: false,
airDCPPDisconnectionInfo: {},
airDCPPClientConfiguration: {},
- airDCPPSocketConnectionInformation: {},
+ airDCPPSessionInformation: {},
setAirDCPPSocketConnectionStatus: () =>
set((value) => ({
airDCPPSocketConnected: value,
@@ -54,10 +54,9 @@ const initializeAirDCPPSocket = async (configuration): Promise
=> {
};
// AirDC++ Socket-related connection and post-connection
// Attempt connection
- const airDCPPSocketConnectionInformation =
- await initializedAirDCPPSocket.connect();
+ const airDCPPSessionInformation = await initializedAirDCPPSocket.connect();
setState({
- airDCPPSocketConnectionInformation,
+ airDCPPSessionInformation,
});
// Set up event listeners