From efc874269906905f91b8ac9b9d784db64bd514c2 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 6 Sep 2021 17:50:25 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Added=20Settings=20page=20?= =?UTF-8?q?scaffold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 1 + Dockerfile | 3 +- src/client/assets/scss/App.scss | 5 ++- src/client/components/App.tsx | 4 +++ src/client/components/Navbar.tsx | 6 +++- src/client/components/Settings.tsx | 15 +++++++++ src/client/shared/settings.json | 51 ++++++++++++++++++++++++++++++ 7 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 src/client/components/Settings.tsx create mode 100644 src/client/shared/settings.json diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d00afe6..62d262f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ LABEL maintainer="Rishi Ghan " RUN mkdir -p /usr/src/threetwo WORKDIR /usr/src/threetwo -COPY package.json yarn.lock /usr/src/threetwo/ +COPY package.json /usr/src/threetwo/ +COPY yarn.lock /usr/src/threetwo/ COPY nodemon.json /usr/src/threetwo COPY jsdoc.json /usr/src/threetwo diff --git a/src/client/assets/scss/App.scss b/src/client/assets/scss/App.scss index d9deadb..618fe11 100644 --- a/src/client/assets/scss/App.scss +++ b/src/client/assets/scss/App.scss @@ -5,6 +5,9 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; $bg-color: yellow; $border-color: red; +.container { + margin-top: 2em; +} .app { font-family: helvetica, arial, sans-serif; padding: 2em; @@ -188,7 +191,7 @@ $border-color: red; .download-icon-labels { .downloads-count { margin: 0 1em 0 0.4em; - border: 1px solid #CCC; + border: 1px solid #ccc; } } .download-tab-name { diff --git a/src/client/components/App.tsx b/src/client/components/App.tsx index d0cb513..d120129 100644 --- a/src/client/components/App.tsx +++ b/src/client/components/App.tsx @@ -6,6 +6,7 @@ import Import from "./Import"; import { ComicDetail } from "./ComicDetail"; import Library from "./Library"; import Search from "./Search"; +import Settings from "./Settings"; import { Switch, Route } from "react-router"; import Navbar from "./Navbar"; @@ -33,6 +34,9 @@ class App extends React.Component { path={"/comic/details/:comicObjectId"} component={ComicDetail} /> + + + ); diff --git a/src/client/components/Navbar.tsx b/src/client/components/Navbar.tsx index fedd65f..9049bd5 100644 --- a/src/client/components/Navbar.tsx +++ b/src/client/components/Navbar.tsx @@ -202,7 +202,11 @@ const Navbar: React.FunctionComponent = (props) => { ) : null}

-

Settings

+

+ + Settings + +

diff --git a/src/client/components/Settings.tsx b/src/client/components/Settings.tsx new file mode 100644 index 0000000..bdb1e2d --- /dev/null +++ b/src/client/components/Settings.tsx @@ -0,0 +1,15 @@ +import React, { useState, useEffect, useCallback, ReactElement } from "react"; + +interface ISettingsProps {} + +export const Settings = (props: ISettingsProps): ReactElement => { + return ( +
+
+

Settings

+
+
+ ); +}; + +export default Settings; diff --git a/src/client/shared/settings.json b/src/client/shared/settings.json new file mode 100644 index 0000000..e9176ef --- /dev/null +++ b/src/client/shared/settings.json @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2015 Rishi Ghan + * + The MIT License (MIT) + +Copyright (c) 2015 Rishi Ghan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ + +/* + * Revision History: + * Initial: 2021/09/06 Rishi Ghan + */ + +// Settings file for ThreeTwo! + +{ + "directConnect": { + "client": { + "name": "airdcpp", + "version": "", + "hostname": "", + "port": "", + "https": false, + "username": "admin", + "password": "password", + "hubs": [{ + + }] + } + } +} \ No newline at end of file