From 874f5fce6a6533c33ba350f4ba411c2986c61415 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 20 Mar 2026 11:37:51 -0500 Subject: [PATCH] Refactor: Removed unused imports from `M3UGroupFilter`, `LiveGroupFilter`, and `VODCategoryFilter` (`Yup`, `M3UProfiles`, several unused Mantine components, dead `OptionWithTooltip` component, duplicate lucide-react imports, and `Divider` in `VODCategoryFilter`). No behaviour changes. --- CHANGELOG.md | 4 +++ .../src/components/forms/LiveGroupFilter.jsx | 3 +- .../src/components/forms/M3UGroupFilter.jsx | 34 +------------------ .../components/forms/VODCategoryFilter.jsx | 1 - 4 files changed, 6 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01acf2a..a2300474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Status filter for M3U group and VOD category filter modals: A new **All / Enabled / Disabled** segmented control is now shown alongside the text search input in the Live, VOD - Movies, and VOD - Series tabs of the M3U Group Filter modal. The status filter works in combination with the text search and also scopes the "Select Visible" / "Deselect Visible" buttons so they only act on the currently visible subset. (Closes #312) +### Changed + +- Frontend cleanup: removed unused imports from `M3UGroupFilter`, `LiveGroupFilter`, and `VODCategoryFilter` (`Yup`, `M3UProfiles`, several unused Mantine components, dead `OptionWithTooltip` component, duplicate lucide-react imports, and `Divider` in `VODCategoryFilter`). No behaviour changes. + ## [0.21.1] - 2026-03-18 ### Fixed diff --git a/frontend/src/components/forms/LiveGroupFilter.jsx b/frontend/src/components/forms/LiveGroupFilter.jsx index 09d073f5..4cfdaca6 100644 --- a/frontend/src/components/forms/LiveGroupFilter.jsx +++ b/frontend/src/components/forms/LiveGroupFilter.jsx @@ -21,10 +21,9 @@ import { Center, SegmentedControl, } from '@mantine/core'; -import { Info } from 'lucide-react'; +import { Info, CircleCheck, CircleX } from 'lucide-react'; import useChannelsStore from '../../store/channels'; import useStreamProfilesStore from '../../store/streamProfiles'; -import { CircleCheck, CircleX } from 'lucide-react'; import { useChannelLogoSelection } from '../../hooks/useSmartLogos'; import { FixedSizeList as List } from 'react-window'; import LazyLogo from '../LazyLogo'; diff --git a/frontend/src/components/forms/M3UGroupFilter.jsx b/frontend/src/components/forms/M3UGroupFilter.jsx index 0a7dc224..20713d4e 100644 --- a/frontend/src/components/forms/M3UGroupFilter.jsx +++ b/frontend/src/components/forms/M3UGroupFilter.jsx @@ -1,52 +1,20 @@ // Modal.js -import React, { useState, useEffect, forwardRef } from 'react'; -import * as Yup from 'yup'; +import React, { useState, useEffect } from 'react'; import API from '../../api'; -import M3UProfiles from './M3UProfiles'; import { LoadingOverlay, - TextInput, Button, - Checkbox, Modal, Flex, - NativeSelect, - FileInput, - Select, - Space, - Chip, Stack, - Group, - Center, - SimpleGrid, - Text, - NumberInput, - Divider, - Alert, - Box, - MultiSelect, - Tooltip, Tabs, } from '@mantine/core'; -import { Info } from 'lucide-react'; import useChannelsStore from '../../store/channels'; import useVODStore from '../../store/useVODStore'; -import { CircleCheck, CircleX } from 'lucide-react'; import { notifications } from '@mantine/notifications'; import LiveGroupFilter from './LiveGroupFilter'; import VODCategoryFilter from './VODCategoryFilter'; -// Custom item component for MultiSelect with tooltip -const OptionWithTooltip = forwardRef( - ({ label, description, ...others }, ref) => ( - -
- {label} -
-
- ) -); - const M3UGroupFilter = ({ playlist = null, isOpen, onClose }) => { const channelGroups = useChannelsStore((s) => s.channelGroups); const fetchCategories = useVODStore((s) => s.fetchCategories); diff --git a/frontend/src/components/forms/VODCategoryFilter.jsx b/frontend/src/components/forms/VODCategoryFilter.jsx index 73932249..646aeca1 100644 --- a/frontend/src/components/forms/VODCategoryFilter.jsx +++ b/frontend/src/components/forms/VODCategoryFilter.jsx @@ -8,7 +8,6 @@ import { Group, SimpleGrid, Text, - Divider, Box, Checkbox, SegmentedControl,