diff --git a/public/assets/misc/flags/de.webp b/public/assets/misc/flags/de.webp deleted file mode 100644 index 1b2ccbc05..000000000 Binary files a/public/assets/misc/flags/de.webp and /dev/null differ diff --git a/public/assets/misc/flags/en.webp b/public/assets/misc/flags/en.webp deleted file mode 100644 index 2ad051b9e..000000000 Binary files a/public/assets/misc/flags/en.webp and /dev/null differ diff --git a/public/assets/misc/flags/es.webp b/public/assets/misc/flags/es.webp deleted file mode 100644 index a8c6dcb30..000000000 Binary files a/public/assets/misc/flags/es.webp and /dev/null differ diff --git a/public/assets/misc/flags/fr.webp b/public/assets/misc/flags/fr.webp deleted file mode 100644 index c6a331c6d..000000000 Binary files a/public/assets/misc/flags/fr.webp and /dev/null differ diff --git a/public/assets/misc/flags/id.webp b/public/assets/misc/flags/id.webp deleted file mode 100644 index fdcc65c28..000000000 Binary files a/public/assets/misc/flags/id.webp and /dev/null differ diff --git a/public/assets/misc/flags/it.webp b/public/assets/misc/flags/it.webp deleted file mode 100644 index f6e5a4aba..000000000 Binary files a/public/assets/misc/flags/it.webp and /dev/null differ diff --git a/public/assets/misc/flags/ja.webp b/public/assets/misc/flags/ja.webp deleted file mode 100644 index aa35a68dd..000000000 Binary files a/public/assets/misc/flags/ja.webp and /dev/null differ diff --git a/public/assets/misc/flags/ko.webp b/public/assets/misc/flags/ko.webp deleted file mode 100644 index aadd9514e..000000000 Binary files a/public/assets/misc/flags/ko.webp and /dev/null differ diff --git a/public/assets/misc/flags/pt.webp b/public/assets/misc/flags/pt.webp deleted file mode 100644 index 708416477..000000000 Binary files a/public/assets/misc/flags/pt.webp and /dev/null differ diff --git a/public/assets/misc/flags/ru.webp b/public/assets/misc/flags/ru.webp deleted file mode 100644 index f33654138..000000000 Binary files a/public/assets/misc/flags/ru.webp and /dev/null differ diff --git a/public/assets/misc/flags/th.webp b/public/assets/misc/flags/th.webp deleted file mode 100644 index b0a486fce..000000000 Binary files a/public/assets/misc/flags/th.webp and /dev/null differ diff --git a/public/assets/misc/flags/vi.webp b/public/assets/misc/flags/vi.webp deleted file mode 100644 index a0c42355a..000000000 Binary files a/public/assets/misc/flags/vi.webp and /dev/null differ diff --git a/public/assets/misc/flags/zh.webp b/public/assets/misc/flags/zh.webp deleted file mode 100644 index b71c855ea..000000000 Binary files a/public/assets/misc/flags/zh.webp and /dev/null differ diff --git a/public/assets/misc/globe.webp b/public/assets/misc/globe.webp new file mode 100644 index 000000000..2cdd2f54a Binary files /dev/null and b/public/assets/misc/globe.webp differ diff --git a/src/lib/characterPreview/CharacterScoringSummary.tsx b/src/lib/characterPreview/CharacterScoringSummary.tsx index a3a02c9bc..c6ea88a4b 100644 --- a/src/lib/characterPreview/CharacterScoringSummary.tsx +++ b/src/lib/characterPreview/CharacterScoringSummary.tsx @@ -34,7 +34,7 @@ export const CharacterScoringSummary = (props: { const characterId = result.simulationForm.characterId const characterMetadata = DB.getMetadata().characters[characterId] - const elementalDmgValue: string = ElementToDamage[characterMetadata.element] + const elementalDmgValue = ElementToDamage[characterMetadata.element] function ScoringSet(props: { set: string @@ -155,7 +155,7 @@ export const CharacterScoringSummary = (props: { const upgradeStat = statUpgrade.stat! const isFlat = Utils.isFlat(statUpgrade.stat) const suffix = isFlat ? '' : '%' - const rollValue = Utils.precisionRound(StatCalculator.getMaxedSubstatValue(upgradeStat, 0.8)) + const rollValue = TsUtils.precisionRound(StatCalculator.getMaxedSubstatValue(upgradeStat as SubStats, 0.8)) rows.push( diff --git a/src/lib/i18n/LanguageSelector.tsx b/src/lib/i18n/LanguageSelector.tsx index 0bacdd541..ba2a6dfb8 100644 --- a/src/lib/i18n/LanguageSelector.tsx +++ b/src/lib/i18n/LanguageSelector.tsx @@ -1,63 +1,50 @@ import { Button, Flex, Select } from 'antd' import { languages } from 'lib/i18n/i18n' import { Assets } from 'lib/rendering/assets' -import React, { ReactElement } from 'react' +import React from 'react' import { useTranslation } from 'react-i18next' -// FIXME LOW - -type placementOptions = 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight' - type Languages = keyof typeof languages const completedLocales: Languages[] = ['en', 'zh', 'pt'] as const -export function LanguageSelector(props: { style: React.CSSProperties; dropdownStyle: React.CSSProperties; flagOnly: boolean; placement: placementOptions }) { +export function LanguageSelector() { const { i18n } = useTranslation() - const selectOptions = ((locales: { [key in Languages]: { locale: string; nativeName: string } }) => { - const ret: { value: string; label: ReactElement }[] = [] - for (const key in locales) { - ret.push({ - value: locales[key as Languages].locale, - label: ( - - - {locales[key as Languages].nativeName} - {/* eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access */} - {completedLocales.includes(locales[key].locale) ? '' : ' (WIP)'} - - ), - }) - } - return ret - })(languages) + const selectOptions = Object.values(languages) + .map(({ locale, nativeName, shortName }) => ({ + value: locale, + display: ( + + + {shortName} + + ), + label: ( + + {nativeName} + {completedLocales.includes(locale) ? '' : ' (WIP)'} + + ), + })) + return (