Skip to content

Commit

Permalink
fix: relic scorer rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
fribbels committed Nov 25, 2024
1 parent c18c19e commit 99ad4af
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const App = () => {
useEffect(() => {
console.log('setting language to:', i18n.resolvedLanguage)
}, [i18n.resolvedLanguage])

return (
<ConfigProvider theme={globalThemeConfig}>
{messageContextHolder}
Expand Down
8 changes: 3 additions & 5 deletions src/lib/characterPreview/ShowcaseLightCone.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Flex, Typography } from 'antd'
import { showcaseDropShadowFilter, showcaseOutline, showcaseShadow, ShowcaseSource } from 'lib/characterPreview/CharacterPreviewComponents'
import { ShowcaseDisplayDimensions, ShowcaseMetadata } from 'lib/characterPreview/characterPreviewController'
import StatText from 'lib/characterPreview/StatText'
import StatText, { StatTextEllipses } from 'lib/characterPreview/StatText'
import { middleColumnWidth, parentW } from 'lib/constants/constantsUi'
import { LoadingBlurredImage } from 'lib/ui/LoadingBlurredImage'
import React from 'react'
Expand Down Expand Up @@ -206,13 +206,11 @@ export function ShowcaseLightConeLargeName(props: {

return (
<Flex vertical style={{ width: middleColumnWidth }}>
<StatText
<StatTextEllipses
style={{ fontSize: 18, fontWeight: 400, marginLeft: 10, marginRight: 10, textAlign: 'center' }}
ellipsis={true}
>
{`${lightConeName}`}
&nbsp;
</StatText>
</StatTextEllipses>
<StatText style={{ fontSize: 18, fontWeight: 400, textAlign: 'center' }}>
{
`${t('common:LevelShort', { level: lightConeLevel })} ${t('common:SuperimpositionNShort', { superimposition: lightConeSuperimposition })}`
Expand Down
8 changes: 8 additions & 0 deletions src/lib/characterPreview/StatText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ const StatText = styled(Text)`
font-weight: 400;
white-space: nowrap;
`
export const StatTextEllipses = styled(Text)`
font-family: Segoe UI, Frutiger, Frutiger Linotype, Dejavu Sans, Helvetica Neue, Arial, sans-serif;
font-size: 17px;
font-weight: 400;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
`
export const StatTextSm = styled(Text)`
font-family: Segoe UI, Frutiger, Frutiger Linotype, Dejavu Sans, Helvetica Neue, Arial, sans-serif;
font-size: 16px;
Expand Down
1 change: 0 additions & 1 deletion src/lib/overlays/modals/ScoringModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export default function ScoringModal() {
centered
onOk={onModalOk}
onCancel={handleCancel}
forceRender
footer={[
<Button key='back' onClick={handleCancel}>
{t('common:Cancel')/* Cancel */}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/rendering/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export function getGlobalThemeConfigFromColorTheme(colorTheme: ColorThemeOverrid
Notification: {
width: 450,
},
Dropdown: {
zIndexPopup: 900,
},
},
algorithm: theme.darkAlgorithm,
}
Expand Down
8 changes: 5 additions & 3 deletions src/lib/tabs/tabShowcase/RelicScorerTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ function CharacterPreviewSelection(props) {
function selectionChange(selected) {
console.log('selectionChange', selected)
props.setSelectedCharacter(props.availableCharacters.find((x) => x.id == selected))
setScoringAlgorithmFocusCharacter(selected)
}

async function simulateClicked() {
Expand Down Expand Up @@ -452,6 +451,7 @@ function CharacterPreviewSelection(props) {
<Flex vertical align='center' gap={5} style={{ marginBottom: 100, width: 1068 }}>
<Flex vertical style={{ display: (props.availableCharacters.length > 0) ? 'flex' : 'none', width: '100%' }}>
<Sidebar presetClicked={presetClicked} activeKey={activeKey}/>

<Flex
style={{ display: (props.availableCharacters.length > 0) ? 'flex' : 'none' }}
justify='space-between'
Expand Down Expand Up @@ -498,7 +498,8 @@ function CharacterPreviewSelection(props) {
onChange={selectionChange}
value={props.selectedCharacter?.id}
/>
<Flex id='previewWrapper' style={{ padding: '5px' }}>

<div id='previewWrapper' style={{ padding: '5px' }}>
<CharacterPreview
class='relicScorerCharacterPreview'
character={props.selectedCharacter}
Expand All @@ -507,7 +508,7 @@ function CharacterPreviewSelection(props) {
setOriginalCharacterModalOpen={setCharacterModalOpen}
setOriginalCharacterModalInitialCharacter={setCharacterModalInitialCharacter}
/>
</Flex>
</div>

<CharacterModal
onOk={onCharacterModalOk}
Expand Down Expand Up @@ -592,6 +593,7 @@ function Sidebar(props) {
gap={5}
>
<Dropdown
zIndexPopup={10}
dropdownRender={() => (dropdownDisplay)}
open={open}
>
Expand Down

0 comments on commit 99ad4af

Please sign in to comment.