Skip to content

Commit

Permalink
UI styling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rorschach7552 committed Sep 12, 2024
1 parent c61358d commit 6a06a03
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 43 deletions.
54 changes: 19 additions & 35 deletions src/app/routes/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,13 @@ const PageContainer = styled(Box)(({ theme }) => ({

const ContentContainer = styled(Box)(({ theme }) => ({
flex: 1,
display: 'flex',
flexDirection: 'column',
width: '100%',
width: '100vw',
overflowY: 'auto',
backgroundImage: `url(${greyBackground})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
padding: theme.spacing(3),
paddingTop: '120px',
}));

const LeftRightColumn = styled(Grid)(({ theme }) => ({
width: '40%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
[theme.breakpoints.down('md')]: {
width: '100%',
},
}));

const MiddleColumn = styled(Grid)(({ theme }) => ({
width: '20%',
[theme.breakpoints.down('md')]: {
width: '100%',
},
paddingTop: '200px',
}));

const HeaderWrapper = styled(Box)({
Expand Down Expand Up @@ -465,14 +446,8 @@ export const Dashboard: React.FC = () => {
/>
</HeaderWrapper>
<ContentContainer>
<Grid container spacing={3}>
<Grid item xs={12}>
<ExoticSelector
selectedCharacter={selectedCharacter!}
selectedExoticItemHash={selectedExotic.itemHash}
/>
</Grid>
<LeftRightColumn item xs={12} md={5}>
<Grid container spacing={3} justifyContent={'center'} alignItems={'flex-start'}>
<Grid item md={4.5}>
<SingleDiamondButton
subclasses={subclasses}
selectedSubclass={selectedSubclass}
Expand All @@ -482,11 +457,20 @@ export const Dashboard: React.FC = () => {
<NumberBoxesContainer>
<NumberBoxes />
</NumberBoxesContainer>
</LeftRightColumn>
<MiddleColumn item xs={12} md={2}>
<StatModifications />
</MiddleColumn>
<LeftRightColumn item xs={12} md={5}>
</Grid>

<Grid container item md={3} justifyContent={'center'} alignItems={'flex-start'}>
<Grid item md={12}>
<ExoticSelector
selectedCharacter={selectedCharacter!}
selectedExoticItemHash={selectedExotic.itemHash}
/>
</Grid>
<Grid item md={8}>
<StatModifications />
</Grid>
</Grid>
<Grid item md={4.5}>
{generatingPermutations ? (
<p>Loading...</p>
) : filteredPermutations ? (
Expand All @@ -497,7 +481,7 @@ export const Dashboard: React.FC = () => {
) : (
<p>Loading....</p>
)}
</LeftRightColumn>
</Grid>
</Grid>
</ContentContainer>
</>
Expand Down
9 changes: 2 additions & 7 deletions src/features/subclass/AbilitiesModification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import { Box, Container } from '@mui/system';
import { PLUG_CATEGORY_HASH } from '../../lib/bungie_api/subclass-constants';
import { RootState } from '../../store';
import { db } from '../../store/db';
import { updateSubclass, updateSubclassMods } from '../../store/LoadoutReducer';
import {
ManifestSubclass,
ManifestPlug,
ManifestAspect,
ManifestStatPlug,
} from '../../types/manifest-types';
import { updateSubclassMods } from '../../store/LoadoutReducer';
import { ManifestPlug, ManifestAspect, ManifestStatPlug } from '../../types/manifest-types';
import { DamageType, SubclassConfig } from '../../types/d2l-types';
import { EMPTY_ASPECT, EMPTY_FRAGMENT } from '../../lib/bungie_api/constants';

Expand Down
4 changes: 3 additions & 1 deletion src/features/subclass/SubclassCustomizationWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ const SubclassCustomizationWrapper: React.FC<SubclassCustomizationWrapperProps>
Back
</TransparentButton>
</Box>
<StatModifications />
<Box sx={{ marginTop: '15vh' }}>
<AbilitiesModification subclass={subclass} />
</Box>
<Box position="absolute" bottom={16} left={16} zIndex={1000}>
<StatModifications />
</Box>
</Box>
);
};
Expand Down

0 comments on commit 6a06a03

Please sign in to comment.