From 1a66d23bfea236ab692dc86cf0220f9b5c90f55f Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 20 Jul 2023 19:24:00 +0300 Subject: [PATCH] Fixed: (UI) Improved mobile search form and show indexer flags --- .../src/Search/Mobile/SearchIndexOverview.js | 17 ++++++++++++- frontend/src/Search/SearchFooter.css | 24 ++++++++++++++++--- frontend/src/Search/SearchFooter.css.d.ts | 1 + frontend/src/Search/SearchFooter.js | 3 +-- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/frontend/src/Search/Mobile/SearchIndexOverview.js b/frontend/src/Search/Mobile/SearchIndexOverview.js index 7294d1f6c..de3e276b6 100644 --- a/frontend/src/Search/Mobile/SearchIndexOverview.js +++ b/frontend/src/Search/Mobile/SearchIndexOverview.js @@ -12,6 +12,7 @@ import Peers from 'Search/Table/Peers'; import dimensions from 'Styles/Variables/dimensions'; import formatAge from 'Utilities/Number/formatAge'; import formatBytes from 'Utilities/Number/formatBytes'; +import titleCase from 'Utilities/String/titleCase'; import translate from 'Utilities/String/translate'; import styles from './SearchIndexOverview.css'; @@ -78,6 +79,7 @@ class SearchIndexOverview extends Component { categories, seeders, leechers, + indexerFlags, size, age, ageHours, @@ -107,7 +109,6 @@ class SearchIndexOverview extends Component { text={title} /> -
@@ -155,6 +156,20 @@ class SearchIndexOverview extends Component { + + { + indexerFlags.length ? + indexerFlags + .sort((a, b) => a.localeCompare(b)) + .map((flag, index) => { + return ( + + ); + }) : + null + }
diff --git a/frontend/src/Search/SearchFooter.css b/frontend/src/Search/SearchFooter.css index 54e68660b..65121e5e3 100644 --- a/frontend/src/Search/SearchFooter.css +++ b/frontend/src/Search/SearchFooter.css @@ -24,7 +24,8 @@ flex-grow: 1; } -.searchButton { +.searchButton, +.grabReleasesButton { composes: button from '~Components/Link/SpinnerButton.css'; margin-left: 25px; @@ -32,18 +33,20 @@ } .selectedReleasesLabel { - margin-bottom: 3px; + margin-bottom: 5px; text-align: right; font-weight: bold; } @media only screen and (max-width: $breakpointSmall) { - .inputContainer { + .inputContainer, + .indexerContainer { margin-right: 0; } .buttonContainer { justify-content: flex-start; + margin-top: 10px; } .buttonContainerContent { @@ -52,5 +55,20 @@ .buttons { justify-content: space-between; + flex-direction: column; + gap: 10px; + } + + .grabReleasesButton, + .searchButton { + margin-left: 0; + } + + .grabReleasesButton { + display: none; + } + + .selectedReleasesLabel { + text-align: center; } } diff --git a/frontend/src/Search/SearchFooter.css.d.ts b/frontend/src/Search/SearchFooter.css.d.ts index 8bf441cf4..e72f81320 100644 --- a/frontend/src/Search/SearchFooter.css.d.ts +++ b/frontend/src/Search/SearchFooter.css.d.ts @@ -4,6 +4,7 @@ interface CssExports { 'buttonContainer': string; 'buttonContainerContent': string; 'buttons': string; + 'grabReleasesButton': string; 'indexerContainer': string; 'inputContainer': string; 'searchButton': string; diff --git a/frontend/src/Search/SearchFooter.js b/frontend/src/Search/SearchFooter.js index 404ad7e79..9e37819be 100644 --- a/frontend/src/Search/SearchFooter.js +++ b/frontend/src/Search/SearchFooter.js @@ -259,11 +259,10 @@ class SearchFooter extends Component { />
- { isPopulated &&