From ac80c23fa85dd467d1f9c414537c8aa106303b3d Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 11 Sep 2023 16:03:41 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Qbittorrent=20form=20scaffold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsdoc.json | 2 +- package.json | 1 + .../QbittorrentConnectionForm.tsx | 22 ++++++++++++++----- src/client/context/QbitTorrentContext.tsx | 8 ------- 4 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 src/client/context/QbitTorrentContext.tsx diff --git a/jsdoc.json b/jsdoc.json index 0d0dcc6..2d59fd5 100644 --- a/jsdoc.json +++ b/jsdoc.json @@ -12,7 +12,7 @@ "plugins/markdown" ], "opts": { - "template": "node_modules/docdash", + "template": "node_modules/tui-jsdoc-template", "encoding": "utf8", "destination": "docs/", "recurse": true, diff --git a/package.json b/package.json index 0721543..95ab8d4 100644 --- a/package.json +++ b/package.json @@ -118,6 +118,7 @@ "sass": "^1.66.1", "storybook": "^7.3.2", "tslint": "^6.1.3", + "tui-jsdoc-template": "^1.2.2", "typescript": "^5.1.6" }, "resolutions": { diff --git a/src/client/components/Settings/QbittorrentSettings/QbittorrentConnectionForm.tsx b/src/client/components/Settings/QbittorrentSettings/QbittorrentConnectionForm.tsx index 6b46d0b..a3364d1 100644 --- a/src/client/components/Settings/QbittorrentSettings/QbittorrentConnectionForm.tsx +++ b/src/client/components/Settings/QbittorrentSettings/QbittorrentConnectionForm.tsx @@ -1,4 +1,5 @@ import React, { ReactElement, useCallback, useEffect } from "react"; +import { Form, Field } from "react-final-form"; import { useDispatch, useSelector } from "react-redux"; import { getQBitTorrentClientInfo } from "../../../actions/settings.actions"; @@ -9,12 +10,23 @@ export const QbittorrentConnectionForm = (): ReactElement => { useEffect(() => { dispatch(getQBitTorrentClientInfo()); }, []) - - return ( -
+ const handleSubmit = () => {} + return (<>
 {JSON.stringify(torrents, null, 4)} 
-
- ); + +
( + +

Configure Qbittorrent

+ +
+ )} + /> + + ); }; export default QbittorrentConnectionForm; diff --git a/src/client/context/QbitTorrentContext.tsx b/src/client/context/QbitTorrentContext.tsx deleted file mode 100644 index b823b99..0000000 --- a/src/client/context/QbitTorrentContext.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import React, { createContext, useEffect, useState } from "react"; -import { useDispatch, useSelector } from "react-redux"; - - -export const QbitTorrentContextProvider = ({ children }) => { - - -} \ No newline at end of file