From 8cf358e17bda6e3de06a3d870baf904b2a7fb554 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Thu, 18 Apr 2024 18:06:56 +0200 Subject: [PATCH] add config option to disable flags in preferences #208 --- client/src/components/popup/preferences.tsx | 10 +++++++++- client/src/config.json | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/src/components/popup/preferences.tsx b/client/src/components/popup/preferences.tsx index 9e77ec67..303ec300 100644 --- a/client/src/components/popup/preferences.tsx +++ b/client/src/components/popup/preferences.tsx @@ -16,6 +16,8 @@ export function PreferencesPopup({ handleClose }: { handleClose: () => void }) { let { t } = useTranslation() const {layout, isSavePreferences, language, setLayout, setIsSavePreferences, setLanguage} = React.useContext(PreferencesContext) + + const marks = [ { value: 0, @@ -59,7 +61,13 @@ export function PreferencesPopup({ handleClose }: { handleClose: () => void }) { value={language} label={t("Language")} onChange={handlerChangeLanguage}> - {lean4gameConfig.languages.map(lang => {return  {lang.name}})} + {lean4gameConfig.languages.map(lang => { + return + {lean4gameConfig.useFlags && } +   + {lang.name} + + })} } diff --git a/client/src/config.json b/client/src/config.json index 9a4d059e..d140efc1 100644 --- a/client/src/config.json +++ b/client/src/config.json @@ -22,5 +22,6 @@ "flag": "CN", "name": "中文" } - ] + ], + "useFlags": false }