Skip to content

Commit

Permalink
fix: background of filter select is now correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed Dec 18, 2023
1 parent 3399742 commit 3b68aeb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/components/filters/FilterOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import React, { VFC, Fragment, useState, useMemo } from "react";
import { FaTag, FaTags, FaUser, FaCompactDisc, FaListCheck, FaSteam } from "react-icons/fa6";
import { FaUserFriends, FaQuestionCircle } from "react-icons/fa";
import { MdApps } from "react-icons/md";
import { IoGameController } from "react-icons/io5";
import { BsCollectionFill, BsWindow } from "react-icons/bs";
import { IoGameController, IoGrid } from "react-icons/io5";
import { BsWindow } from "react-icons/bs";
import { IconType } from "react-icons/lib";

import { FilterType, ReviewScoreType, TabFilterSettings, ThresholdCondition, TimeUnit, compatCategoryToLabel } from "./Filters";
Expand Down Expand Up @@ -100,7 +100,7 @@ const CollectionFilterOptions: VFC<FilterOptionsProps<'collection'>> = ({ index,
rgOptions={collectionDropdownOptions}
selectedOption={filter.params.id}
onChange={onChange}
TriggerIcon={BsCollectionFill}
TriggerIcon={IoGrid}
determineEntryIcon={getCollectionIcon}
/>
}
Expand Down
32 changes: 32 additions & 0 deletions src/components/filters/Filters.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { IconType } from "react-icons/lib";
import { MicroSDeckInterop } from '../../lib/controllers/MicroSDeckInterop';
import { PluginController } from "../../lib/controllers/PluginController";
import { DateIncludes, DateObj } from '../generic/DatePickers';
import { STEAM_FEATURES_ID_MAP } from "./SteamFeatures";
import { FaUserFriends } from "react-icons/fa";
import { IoGrid } from "react-icons/io5";
import { SiSteamdeck } from "react-icons/si";
import { FaAward, FaBan, FaCalendarDays, FaCloudArrowDown, FaCodeMerge, FaHardDrive, FaListCheck, FaPlay, FaRegClock, FaSdCard, FaSteam, FaTags } from "react-icons/fa6";
import { BsClockHistory, BsRegex } from "react-icons/bs";
import { PiListPlusFill } from "react-icons/pi";

export type FilterType = 'collection' | 'installed' | 'regex' | 'friends' | 'tags' | 'whitelist' | 'blacklist' | 'merge' | 'platform' | 'deck compatibility' | 'review score' | 'time played' | 'size on disk' | 'release date' | 'last played' | 'demo' | 'streamable' | 'steam features' | 'sd card';

Expand Down Expand Up @@ -121,6 +128,31 @@ export const FilterDescriptions: { [filterType in FilterType]: string } = {
"sd card": "Selects apps that are present on the inserted/specific MicroSD Card"
}

/**
* Dictionary of icons for each filter.
*/
export const FilterIcons: { [filterType in FilterType]: IconType } = {
collection: IoGrid,
installed: FaPlay,
regex: BsRegex,
friends: FaUserFriends,
tags: FaTags,
whitelist: PiListPlusFill,
blacklist: FaBan,
merge: FaCodeMerge,
platform: FaSteam,
"deck compatibility": SiSteamdeck,
"review score": FaAward,
"time played": FaRegClock,
"size on disk": FaHardDrive,
"release date": FaCalendarDays,
"last played": BsClockHistory,
demo: ,
streamable: FaCloudArrowDown,
"steam features": FaListCheck,
"sd card": FaSdCard
}


/**
* Whether the filter should have an invert option.
Expand Down
5 changes: 1 addition & 4 deletions src/components/styles/FilterSelectionStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,14 @@ export const FilterSelectStyles: VFC<{}> = ({}) => {
background: radial-gradient(155.42% 100% at 0% 0%, #060a0e 0 0%, #0e141b 100%);
}
.tab-master-filter-select .gpfocuswithin .${achievementClasses.AchievementListItemBase} {
background: #767a8773;
}
.tab-master-filter-select .entry-label {
font-size: 22px;
text-align: initial;
}
.tab-master-filter-select .entry-disabled {
color: #92939B;
background-color: #20222996;
}
.tab-master-filter-select .entry-desc {
Expand Down

0 comments on commit 3b68aeb

Please sign in to comment.