From 3da594ec750087898ba2d70923f1f69ebe3e290d Mon Sep 17 00:00:00 2001 From: stacksmash76 <98354295+stacksmash76@users.noreply.github.com> Date: Sun, 17 Jul 2022 23:34:49 +0200 Subject: [PATCH] feat(web): mobile UI improvements (#359) * enhancement: improved alerts component contrast enhancement: simplified and improved radio switch group look fix: fixed inconsistent spacing in input components (there's still some work left to be done) fix: made slideover panel display on full width on mobile devices enhancement: made forms more accessible to mobile users, adapter changes in accordance with the previous input components fix fix: fixed misspelling in NotificationForms filename chore: cleaned up code fix: made filter table top edges less round and improved look fix: fixed a bug where when a modal/slideover component was opened, a 1px white bar would be shown in one of the modal parent elements (for the fix see L89 in screens/settings/DwonloadClient.tsx) enhancement: improved responsiveness for irc network list * Fixed 2 small comma warnings from ESLint Co-authored-by: anonymous --- web/src/api/APIClient.ts | 2 +- web/src/components/alerts/index.tsx | 30 +- web/src/components/debug.tsx | 2 +- web/src/components/inputs/input_wide.tsx | 10 +- web/src/components/inputs/radio.tsx | 34 +- web/src/components/inputs/select.tsx | 2 +- web/src/components/modals/index.tsx | 2 +- web/src/components/panels/index.tsx | 4 +- web/src/domain/constants.ts | 2 +- web/src/forms/filters/FilterAddForm.tsx | 2 +- .../forms/settings/DownloadClientForms.tsx | 198 +++---- web/src/forms/settings/FeedForms.tsx | 2 +- web/src/forms/settings/IndexerForms.tsx | 38 +- web/src/forms/settings/IrcForms.tsx | 128 +++-- ...iactionForms.tsx => NotificationForms.tsx} | 87 +-- web/src/screens/Settings.tsx | 2 +- web/src/screens/filters/details.tsx | 511 +++++++++--------- web/src/screens/filters/list.tsx | 4 +- web/src/screens/settings/Action.tsx | 20 +- web/src/screens/settings/Application.tsx | 23 +- web/src/screens/settings/DownloadClient.tsx | 10 +- web/src/screens/settings/Feed.tsx | 4 +- web/src/screens/settings/Indexer.tsx | 2 +- web/src/screens/settings/Irc.tsx | 237 +++++--- web/src/screens/settings/Notifications.tsx | 2 +- web/src/screens/settings/Releases.tsx | 40 +- 26 files changed, 758 insertions(+), 640 deletions(-) rename web/src/forms/settings/{NotifiactionForms.tsx => NotificationForms.tsx} (88%) diff --git a/web/src/api/APIClient.ts b/web/src/api/APIClient.ts index 3244ab4..4b8c916 100644 --- a/web/src/api/APIClient.ts +++ b/web/src/api/APIClient.ts @@ -99,7 +99,7 @@ export const APIClient = { toggleEnable: (id: number, enabled: boolean) => appClient.Patch(`api/feeds/${id}/enabled`, { enabled }), update: (feed: Feed) => appClient.Put(`api/feeds/${feed.id}`, feed), delete: (id: number) => appClient.Delete(`api/feeds/${id}`), - test: (feed: Feed) => appClient.Post("api/feeds/test", feed), + test: (feed: Feed) => appClient.Post("api/feeds/test", feed) }, indexers: { // returns indexer options for all currently present/enabled indexers diff --git a/web/src/components/alerts/index.tsx b/web/src/components/alerts/index.tsx index 8e8e141..981b6f0 100644 --- a/web/src/components/alerts/index.tsx +++ b/web/src/components/alerts/index.tsx @@ -2,26 +2,26 @@ import { ExclamationIcon } from "@heroicons/react/solid"; interface props { - title: string; + title?: string; text: string; } export function AlertWarning({ title, text }: props) { return ( -
-
-
-
-
-
-

{title}

-
-

{text}

-
+
+
+
+
+
+ {title ? ( +

{title}

+ ) : null} +
+

{text}

diff --git a/web/src/components/debug.tsx b/web/src/components/debug.tsx index f9aec16..b96dd31 100644 --- a/web/src/components/debug.tsx +++ b/web/src/components/debug.tsx @@ -11,7 +11,7 @@ const DEBUG: FC = ({ values }) => { return (
-
{JSON.stringify(values, null, 2)}
+
{JSON.stringify(values, null, 2)}
); }; diff --git a/web/src/components/inputs/input_wide.tsx b/web/src/components/inputs/input_wide.tsx index eae7cdf..be2fa67 100644 --- a/web/src/components/inputs/input_wide.tsx +++ b/web/src/components/inputs/input_wide.tsx @@ -25,7 +25,7 @@ export const TextFieldWide = ({ required, hidden }: TextFieldWideProps) => ( -