Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegMoshkovich committed Feb 21, 2023
1 parent 7437dc8 commit b648a68
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
Binary file removed public/Momentum.png
Binary file not shown.
Binary file removed public/Schependomlaan.jpg
Binary file not shown.
Binary file removed public/Schependomlaan.png
Binary file not shown.
Binary file removed public/Tinyhouse.png
Binary file not shown.
Binary file modified public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
test: `random`,
})
</script>
<title>BLDRS</title>
<title>bldrs.ai</title>
<!-- Start Single Page Apps for GitHub Pages -->
<script type="text/javascript">
// Single Page Apps for GitHub Pages
Expand Down
Binary file removed public/logo-buildings.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Components/About/AboutControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function AboutControl() {

return (
<ControlButton
title='About BLDRS'
title='About bldrs'
isDialogDisplayed={isDialogDisplayed}
setIsDialogDisplayed={setIsDialogDisplayed}
icon={
Expand Down
4 changes: 2 additions & 2 deletions src/Components/About/AboutControl.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import AboutControl from './AboutControl'
describe('About control tests', () => {
test('renders the AboutControl button', () => {
const {getByTitle} = render(<MockComponent><AboutControl/></MockComponent>)
const aboutControl = getByTitle('About BLDRS')
const aboutControl = getByTitle('About bldrs')
expect(aboutControl).toBeInTheDocument()
})

test('renders AbotDialog when control is pressed', () => {
const {getByTitle, getByText} = render(<MockComponent><AboutControl/></MockComponent>)
const aboutControl = getByTitle('About BLDRS')
const aboutControl = getByTitle('About bldrs')
fireEvent.click(aboutControl)
const dialogTitle = getByText('build every thing together')
expect(dialogTitle).toBeInTheDocument()
Expand Down
12 changes: 5 additions & 7 deletions src/Components/About/AboutGuide.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function AboutGuide() {
fontSize: '0.8em',
borderRadius: '10px',
margin: '2em 0',
padding: '.5em 1em .5em .5em',
padding: '.3em 1em .5em .5em',
color: theme.palette.primary.contrastText,
backgroundColor: colorMode.isDay() ? '#E8E8E8' : '#353535',
}}
Expand All @@ -46,14 +46,13 @@ export default function AboutGuide() {
textAlign: 'right',
verticalAlign: 'middle',
whiteSpace: 'nowrap',
lineHeight: '17px',
lineHeight: '15px',
},
'& a': {
textAlign: 'right',
verticalAlign: 'middle',
whiteSpace: 'nowrap',
lineHeight: '17px',
fontWeight: 'bold',
lineHeight: '20px',
},
}}
>
Expand All @@ -69,13 +68,13 @@ export default function AboutGuide() {
href='https://bldrs.ai/share/v/p/index.ifc#c:-111.37,14.94,90.63,-43.48,15.73,-4.34::i:1506392033'
target='_new'
>
<OpenIcon/> ← Open
<OpenIcon/><span style={{textDecoration: 'underline'}}>Open</span>
</a>
<a
href='https://bldrs.ai/share/v/p/index.ifc#c:-111.37,14.94,90.63,-43.48,15.73,-4.34::i:1493510953'
target='_new'
>
Share → <ShareIcon/>
<span style={{textDecoration: 'underline'}}>Share</span><ShareIcon/>
</a>
</Box>
<div>Notes → <NotesIcon/></div>
Expand All @@ -91,7 +90,6 @@ export default function AboutGuide() {
'& svg': {
width: '130px',
height: '100px',
opacity: .9,
},
}}
>
Expand Down
8 changes: 4 additions & 4 deletions src/Components/CutPlaneMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@ export default function CutPlaneMenu() {
},
sx: {
'& .Mui-selected': {
color: theme.theme.palette.secondary.main,
color: theme.theme.palette.secondary.contrastText,
fontWeight: 600,
},
},
}}
>
<MenuItem onClick={() => togglePlane({direction: 'x'})}
selected={cutPlanes.findIndex((cutPlane) => cutPlane.direction === 'x') > -1}
>X
>section - x
</MenuItem>
<MenuItem onClick={() => togglePlane({direction: 'y'})}
selected={cutPlanes.findIndex((cutPlane) => cutPlane.direction === 'y') > -1}
>Y
>plan - y
</MenuItem>
<MenuItem onClick={() => togglePlane({direction: 'z'})}
selected={cutPlanes.findIndex((cutPlane) => cutPlane.direction === 'z') > -1}
>Z
>section - z
</MenuItem>
</Menu>
</>
Expand Down
8 changes: 4 additions & 4 deletions src/Components/CutPlaneMenu.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ describe('CutPlaneMenu', () => {
const {getByTitle, getByText} = render(<ShareMock><CutPlaneMenu/></ShareMock>)
const sectionButton = getByTitle('Section')
fireEvent.click(sectionButton)
expect(getByText('X')).toBeInTheDocument()
expect(getByText('Y')).toBeInTheDocument()
expect(getByText('Z')).toBeInTheDocument()
expect(getByText('section - x')).toBeInTheDocument()
expect(getByText('plan - y')).toBeInTheDocument()
expect(getByText('section - z')).toBeInTheDocument()
})


Expand All @@ -34,7 +34,7 @@ describe('CutPlaneMenu', () => {
result.current.setViewerStore(viewer)
})
fireEvent.click(sectionButton)
const xDirection = getByText('X')
const xDirection = getByText('section - x')
fireEvent.click(xDirection)
const callCreatePlanes = viewer.clipper.createFromNormalAndCoplanarPoint.mock.calls
expect(callCreatePlanes.length).toBe(1)
Expand Down
4 changes: 2 additions & 2 deletions src/Components/SnackbarMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export default function SnackBarMessage({message, type, open}) {
'backgroundColor': theme.palette.primary.background,
'color': theme.palette.primary.contrastText,
'position': 'relative',
'bottom': '90px',
'bottom': '60px',
'left': '-6px',
'@media (max-width: 900px)': {
left: '18px',
bottom: '100px',
bottom: '60px',
width: '305px',
inlineSize: '305px',
overflow: 'visible',
Expand Down
2 changes: 2 additions & 0 deletions src/Components/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import GitHubIcon from '@mui/icons-material/GitHub'

const UserProfile = ({size = 'medium'}) => {
const {user, isAuthenticated, logout} = useAuth0()
console.log('user', user)
console.log('isAuthenticated', isAuthenticated)
const popupState = usePopupState({
variant: 'popup',
popupId: 'user-profile',
Expand Down
4 changes: 2 additions & 2 deletions src/Share.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ export function navToDefault(navigate, appPrefix) {
const mediaSizeTabletWith = 900
window.removeEventListener('beforeunload', handleBeforeUnload)
if (window.innerWidth <= mediaSizeTabletWith) {
navigate(`${appPrefix}/v/p/index.ifc#c:-158.5,-86,165.36,-39.36,18.57,-5.33`)
navigate(`${appPrefix}/v/p/index.ifc#c:-150.147,-85.796,167.057,-32.603,17.373,-1.347`)
} else {
navigate(`${appPrefix}/v/p/index.ifc#c:-111.37,14.94,90.63,-43.48,15.73,-4.34`)
navigate(`${appPrefix}/v/p/index.ifc#c:-119.076,0.202,83.165,-44.967,19.4,-4.972`)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Theme.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function loadTheme(mode) {
contrastText: colors.grey.lightest,
},
secondary: {
main: colors.green.lightest,
main: colors.green.light,
background: colors.green.medium,
contrastText: colors.green.lightest,
},
Expand Down

0 comments on commit b648a68

Please sign in to comment.