From d825487cc49c267fa52aaa714a6f099b2d549169 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) ## Description: 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. ## Please complete the following: - [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 ## Please put your Discord username so you can be contacted if a bug or 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 86e413677..996da1028 100644 --- a/src/client/FlagInputModal.ts +++ b/src/client/FlagInputModal.ts @@ -29,9 +29,7 @@ export class FlagInputModal extends LitElement { class="flex flex-wrap justify-evenly gap-[1rem] overflow-y-auto overflow-x-hidden h-[90%]" > ${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`