From ae977fbde77cd5e0ee2ae8f0404962d7edd1b412 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 18 Jan 2026 22:34:08 +0100 Subject: [PATCH] Clean mobile filters --- web/components/filters/age-filter.tsx | 2 +- web/components/filters/desktop-filters.tsx | 92 +++++++++---------- web/components/filters/gender-filter.tsx | 2 +- web/components/filters/has-kids-filter.tsx | 2 +- web/components/filters/location-filter.tsx | 6 +- web/components/filters/mobile-filters.tsx | 67 +++++++++----- web/components/filters/pref-gender-filter.tsx | 4 +- web/components/filters/wants-kids-filter.tsx | 2 +- web/messages/de.json | 1 + web/messages/fr.json | 1 + 10 files changed, 99 insertions(+), 80 deletions(-) diff --git a/web/components/filters/age-filter.tsx b/web/components/filters/age-filter.tsx index 11ab7a8..1ffc387 100644 --- a/web/components/filters/age-filter.tsx +++ b/web/components/filters/age-filter.tsx @@ -28,7 +28,7 @@ export function AgeFilterText(props: { return ( {t('filter.age.any', 'Any')}{' '} - {t('filter.age.age', 'age')} + {t('filter.age.age', 'age')} ) } diff --git a/web/components/filters/desktop-filters.tsx b/web/components/filters/desktop-filters.tsx index 0b136da..c94a899 100644 --- a/web/components/filters/desktop-filters.tsx +++ b/web/components/filters/desktop-filters.tsx @@ -14,7 +14,6 @@ import {MyMatchesToggle} from './my-matches-toggle' import {Profile} from 'common/profiles/profile' import {FilterFields} from "common/filters"; import {ShortBioToggle} from "web/components/filters/short-bio-toggle"; -import {PrefGenderFilter, PrefGenderFilterText} from "web/components/filters/pref-gender-filter"; import DropdownMenu from "web/components/comments/dropdown-menu"; import {KidsLabel, useWantsKidsLabelsWithIcon} from "web/components/filters/wants-kids-filter"; import {hasKidsLabels} from "common/has-kids"; @@ -218,25 +217,25 @@ export function DesktopFilters(props: { /> {/* GENDER THEY SEEK */} - ( - - } - open={open} - /> - )} - dropdownMenuContent={ - - - - } - popoverClassName="bg-canvas-50" - /> + {/* (*/} + {/* */} + {/* }*/} + {/* open={open}*/} + {/* />*/} + {/* )}*/} + {/* dropdownMenuContent={*/} + {/* */} + {/* */} + {/* */} + {/* }*/} + {/* popoverClassName="bg-canvas-50"*/} + {/*/>*/} {includeRelationshipFilters && <> @@ -413,6 +412,31 @@ export function DesktopFilters(props: { menuWidth="w-80" /> + {/* SMOKER */} + ( + + + + + } + /> + )} + dropdownMenuContent={ + + + + } + popoverClassName="bg-canvas-50" + menuWidth="w-50" + /> + {/* LANGUAGES */} ( @@ -442,7 +466,6 @@ export function DesktopFilters(props: { {/* Interests */} ( ( ( - {/* SMOKER */} - ( - - - - - } - /> - )} - dropdownMenuContent={ - - - - } - popoverClassName="bg-canvas-50" - menuWidth="w-50" - /> - {/* EDUCATION */} ( diff --git a/web/components/filters/gender-filter.tsx b/web/components/filters/gender-filter.tsx index 781bfc0..adf9294 100644 --- a/web/components/filters/gender-filter.tsx +++ b/web/components/filters/gender-filter.tsx @@ -18,7 +18,7 @@ export function GenderFilterText(props: { return ( {t('filter.gender.any', 'Any')}{' '} - {t('filter.gender.gender', 'gender')} + {t('filter.gender.gender', 'gender')} ) } diff --git a/web/components/filters/has-kids-filter.tsx b/web/components/filters/has-kids-filter.tsx index d1535e7..fc610b4 100644 --- a/web/components/filters/has-kids-filter.tsx +++ b/web/components/filters/has-kids-filter.tsx @@ -28,7 +28,7 @@ export function HasKidsLabel(props: { } return ( - + diff --git a/web/components/filters/location-filter.tsx b/web/components/filters/location-filter.tsx index f2d6829..af381e0 100644 --- a/web/components/filters/location-filter.tsx +++ b/web/components/filters/location-filter.tsx @@ -26,16 +26,16 @@ export function LocationFilterText(props: { return ( {t('filter.location.any', 'Any')} - {t('filter.location', 'location')} + {t('filter.location', 'location')} ) } return ( - + {radius} miles {' '} - near{' '} + {t('filter.near', 'near')}{' '} {location.name} ) diff --git a/web/components/filters/mobile-filters.tsx b/web/components/filters/mobile-filters.tsx index 7aa8f28..988456b 100644 --- a/web/components/filters/mobile-filters.tsx +++ b/web/components/filters/mobile-filters.tsx @@ -13,7 +13,6 @@ import {Gender} from 'common/gender' import {DietType, RelationshipType, RomanticType} from 'web/lib/util/convert-types' import {FilterFields} from "common/filters"; import {ShortBioToggle} from "web/components/filters/short-bio-toggle"; -import {PrefGenderFilter, PrefGenderFilterText} from "./pref-gender-filter" import {KidsLabel, WantsKidsFilter} from "web/components/filters/wants-kids-filter"; import {wantsKidsLabels} from "common/wants-kids"; import {HasKidsFilter, HasKidsLabel} from "./has-kids-filter" @@ -35,6 +34,14 @@ import {InterestFilter, InterestFilterText} from "web/components/filters/interes import {OptionTableKey} from "common/profiles/constants"; import {NewBadge} from "web/components/new-badge"; import {useT} from "web/lib/locale"; +import {FaUserGroup} from "react-icons/fa6"; +import {BsPersonHeart, BsPersonVcard} from "react-icons/bs"; +import {FaBriefcase, FaHandsHelping, FaHeart, FaStar} from "react-icons/fa"; +import {GiFruitBowl} from "react-icons/gi"; +import {MdLanguage, MdLocalBar} from "react-icons/md"; +import {LuCigarette, LuGraduationCap} from "react-icons/lu"; +import {RiScales3Line} from "react-icons/ri"; +import {PiHandsPrayingBold} from "react-icons/pi"; function MobileFilters(props: { filters: Partial @@ -106,12 +113,13 @@ function MobileFilters(props: { /> - {/* RELATIONSHIP STYLE */} + {/* CONNECTION */} } selection={ } selection={ {/* PREFERRED GENDER */} - - } - > - - + {/**/} + {/* }*/} + {/*>*/} + {/* */} + {/**/} {includeRelationshipFilters && <> @@ -235,6 +245,7 @@ function MobileFilters(props: { openFilter={openFilter} setOpenFilter={setOpenFilter} isActive={hasAny(filters.pref_romantic_styles || undefined)} + icon={} selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } selection={ } > @@ -526,6 +545,7 @@ function MobileFilters(props: { openFilter={openFilter} setOpenFilter={setOpenFilter} isActive={hasAny(filters.education_levels)} + icon={} selection={ {showNewBadge && } {icon} - {title}: {selection} + {selection} + {/*{title}: {selection}*/}
{isOpen ? ( diff --git a/web/components/filters/pref-gender-filter.tsx b/web/components/filters/pref-gender-filter.tsx index 69cb3a9..99cd4bf 100644 --- a/web/components/filters/pref-gender-filter.tsx +++ b/web/components/filters/pref-gender-filter.tsx @@ -17,7 +17,7 @@ export function PrefGenderFilterText(props: { if (!pref_gender || pref_gender.length < 1) { return ( - {t('filter.gender.they_seek', 'Gender they seek')}: + {t('filter.gender.they_seek', 'Gender they seek')}: - {t('filter.gender.they_seek', 'Gender they seek')}: + {t('filter.gender.they_seek', 'Gender they seek')}: {pref_gender.map((gender) => { return ( - +