From 56f748b16fa4f9bb9afc7be8a6ff5b868a6df4b2 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Thu, 14 Aug 2025 11:21:01 -0700 Subject: [PATCH] restrict problematic flags fixes #1690 (#1805) Some flags are offensive, so don't allow them to be selected by users. I think it's fine for nations continue to use the flags. - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced regression is found: evan --- src/client/FlagInputModal.ts | 11 ++++++++--- src/client/data/countries.json | 9 ++++++--- src/core/Schemas.ts | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/client/FlagInputModal.ts b/src/client/FlagInputModal.ts index 84da9f855..0be8ccf52 100644 --- a/src/client/FlagInputModal.ts +++ b/src/client/FlagInputModal.ts @@ -34,9 +34,7 @@ export class FlagInputModal extends LitElement { class="flex flex-wrap justify-evenly gap-[1rem] overflow-y-auto overflow-x-hidden h-[90%]" > ${this.isModalOpen ? Countries.filter( - (country) => - country.name.toLowerCase().includes(this.search.toLowerCase()) || - country.code.toLowerCase().includes(this.search.toLowerCase()), + (country) => !country.restricted && this.includedInSearch(country), ).map( (country) => html`