From 653cd16eb2d78a051bcd52493f8ae7c76b4c8232 Mon Sep 17 00:00:00 2001 From: Gykes Date: Mon, 9 Sep 2024 21:54:15 -0700 Subject: [PATCH] Updating Reload Scrapers formatting (#5235) Per convo with people on Discord. I have updated the Reload Scrapers UI. It now adds a button if the filter box appears and then the button extends and takes up the whole space if the filter box does not exist. --------- Co-authored-by: CJ Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com> --- ui/v2.5/src/components/Shared/ScraperMenu.tsx | 38 +++++++++---------- ui/v2.5/src/components/Shared/styles.scss | 30 +++++++++++++++ 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/ui/v2.5/src/components/Shared/ScraperMenu.tsx b/ui/v2.5/src/components/Shared/ScraperMenu.tsx index f73103e57..4cc38b6f8 100644 --- a/ui/v2.5/src/components/Shared/ScraperMenu.tsx +++ b/ui/v2.5/src/components/Shared/ScraperMenu.tsx @@ -1,14 +1,12 @@ import React, { useMemo, useState } from "react"; -import { Dropdown } from "react-bootstrap"; -import { FormattedMessage, useIntl } from "react-intl"; +import { Dropdown, Button } from "react-bootstrap"; +import { useIntl } from "react-intl"; import { Icon } from "./Icon"; import { stashboxDisplayName } from "src/utils/stashbox"; import { ScraperSourceInput, StashBox } from "src/core/generated-graphql"; import { faSyncAlt } from "@fortawesome/free-solid-svg-icons"; import { ClearableInput } from "./ClearableInput"; -const minFilteredScrapers = 5; - export const ScraperMenu: React.FC<{ toggle: React.ReactNode; variant?: string; @@ -54,22 +52,22 @@ export const ScraperMenu: React.FC<{ {toggle} - onReloadScrapers()}> - - - - - - - - - {(stashBoxes?.length ?? 0) + scrapers.length > minFilteredScrapers && ( - - )} +
+
+ + +
+
{filteredStashboxes.map((s, index) => (