diff --git a/libs/common/ui/src/components/NumberInputLazy.tsx b/libs/common/ui/src/components/NumberInputLazy.tsx index 46e8c7b5e3..c70bba0c03 100644 --- a/libs/common/ui/src/components/NumberInputLazy.tsx +++ b/libs/common/ui/src/components/NumberInputLazy.tsx @@ -25,7 +25,8 @@ export function NumberInputLazy({ }, [valueProp]) const saveValue = () => { - let num = float ? parseFloat(value) : parseInt(value) + const normalizedValue = float ? value.replace(',', '.') : value + let num = float ? parseFloat(normalizedValue) : parseInt(normalizedValue) if (isNaN(num)) { num = 0 setValue(num.toString()) @@ -48,7 +49,7 @@ export function NumberInputLazy({ ) => { const val = event.target.value - if (val.match(float ? /[^0-9.-]/ : /[^0-9-]/)) { + if (val.match(float ? /[^0-9.,-]/ : /[^0-9-]/)) { return event.preventDefault() } diff --git a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactMainStatAndSetEditor/ArtifactSetsEditor.tsx b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactMainStatAndSetEditor/ArtifactSetsEditor.tsx index 12bed28fae..e6cf9937b4 100644 --- a/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactMainStatAndSetEditor/ArtifactSetsEditor.tsx +++ b/libs/gi/page-team/src/CharacterDisplay/Tabs/TabTheorycraft/ArtifactMainStatAndSetEditor/ArtifactSetsEditor.tsx @@ -47,6 +47,7 @@ export function ArtifactSetsEditor({ artSetKey={''} setArtSetKey={setSet} label={'New Artifact Set'} + blurOnSelect={true} getOptionDisabled={({ key }) => Object.keys(artSet).includes(key as ArtifactSetKey) || !key || diff --git a/libs/gi/ui/src/components/artifact/editor/index.tsx b/libs/gi/ui/src/components/artifact/editor/index.tsx index d69e6cc59d..6960668605 100644 --- a/libs/gi/ui/src/components/artifact/editor/index.tsx +++ b/libs/gi/ui/src/components/artifact/editor/index.tsx @@ -136,6 +136,8 @@ const InputInvis = styled('input')({ display: 'none', }) +const LineBreak = styled('br')() + function getDefaultSlotKey( artifactSet?: ArtifactSetKey ): Extract { @@ -649,6 +651,8 @@ export function ArtifactEditor({ > {t('editor.uploadBtn')} + {/* https://github.com/frzyc/genshin-optimizer/pull/2597 */} + {shouldShowDevComponents && debugImgs && ( @@ -718,7 +722,6 @@ export function ArtifactEditor({ )} - {/* Right column */} {/* substat selections */}