Lint project
This commit is contained in:
@@ -3,7 +3,7 @@ import { useAuth } from '@redwoodjs/auth'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import Part2Cell from 'src/components/Part2Cell'
|
||||
|
||||
const EditPart2Page = ({userName, partTitle}) => {
|
||||
const EditPart2Page = ({ userName, partTitle }) => {
|
||||
const { currentUser } = useAuth()
|
||||
return (
|
||||
<MainLayout>
|
||||
|
||||
@@ -4,7 +4,7 @@ import EditUser2Cell from 'src/components/EditUser2Cell'
|
||||
const UserPage = ({ userName }) => {
|
||||
return (
|
||||
<MainLayout>
|
||||
<EditUser2Cell userName={userName}/>
|
||||
<EditUser2Cell userName={userName} />
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import MainLayout from 'src/layouts/MainLayout'
|
||||
import { initialize } from 'src/cascade/js/MainPage/CascadeMain'
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
const starterCode =
|
||||
`// Welcome to Cascade Studio! Here are some useful functions:
|
||||
const starterCode = `// Welcome to Cascade Studio! Here are some useful functions:
|
||||
// Translate(), Rotate(), Scale(), Union(), Difference(), Intersection()
|
||||
// Box(), Sphere(), Cylinder(), Cone(), Text3D(), Polygon()
|
||||
// Offset(), Extrude(), RotatedExtrude(), Revolve(), Pipe(), Loft(),
|
||||
@@ -25,7 +24,7 @@ Translate([0, 0, 50], Difference(sphere, [cylinderX, cylinderY, cylinderZ]));
|
||||
Translate([-100, 0, 100], Text3D("cadhub.xyz"));
|
||||
|
||||
// Don't forget to push imported or oc-defined shapes into sceneShapes to add them to the workspace!
|
||||
`;
|
||||
`
|
||||
|
||||
const HomePage1 = () => {
|
||||
const [code, setCode] = useState(starterCode)
|
||||
@@ -34,39 +33,83 @@ const HomePage1 = () => {
|
||||
new initialize(sickCallback, starterCode)
|
||||
}, [])
|
||||
return (
|
||||
|
||||
<MainLayout>
|
||||
<div>current code {code}</div>
|
||||
<BlogPostsCell/>
|
||||
<BlogPostsCell />
|
||||
<div>
|
||||
<div id="topnav" className="topnav">
|
||||
<a href="https://github.com/zalo/CascadeStudio">Cascade Studio 0.0.6</a>
|
||||
<a href="#" id="main-proj-button" title="Sets this project to save in local storage." onClick={() => makeMainProject()}>Make Main Project</a>
|
||||
<a href="#" title="Save Project to .json" onClick={() => saveProject()}>Save Project</a>
|
||||
<label htmlFor="project-file" title="Load Project from .json">Load Project
|
||||
<input
|
||||
id="project-file"
|
||||
name="project-file"
|
||||
type="file"
|
||||
accept=".json"
|
||||
style={{display:'none'}}
|
||||
onInput={() => loadProject()}
|
||||
/>
|
||||
</label>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTEP()}>Save STEP</a>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTL()}>Save STL</a>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeOBJ()}>Save OBJ</a>
|
||||
<label htmlFor="files" title="Import STEP, IGES, or (ASCII) STL from File">Import STEP/IGES/STL
|
||||
<input id="files" name="files" type="file" accept=".iges,.step,.igs,.stp,.stl" multiple style={{display: 'none'}} onInput={ () =>loadFiles()}/>
|
||||
</label>
|
||||
<a href="#" title="Clears the external step/iges/stl files stored in the project." onClick={() => clearExternalFiles()}>Clear Imported Files</a>
|
||||
<a href="" title="Resets the project and localstorage." onClick={() => {
|
||||
window.localStorage.clear();
|
||||
window.history.replaceState({}, 'Cascade Studio','?')
|
||||
}}>Reset Project</a>
|
||||
</div>
|
||||
<div id="cascade-container" style={{height:'auto'}}>
|
||||
<a href="https://github.com/zalo/CascadeStudio">
|
||||
Cascade Studio 0.0.6
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
id="main-proj-button"
|
||||
title="Sets this project to save in local storage."
|
||||
onClick={() => makeMainProject()}
|
||||
>
|
||||
Make Main Project
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
title="Save Project to .json"
|
||||
onClick={() => saveProject()}
|
||||
>
|
||||
Save Project
|
||||
</a>
|
||||
<label htmlFor="project-file" title="Load Project from .json">
|
||||
Load Project
|
||||
<input
|
||||
id="project-file"
|
||||
name="project-file"
|
||||
type="file"
|
||||
accept=".json"
|
||||
style={{ display: 'none' }}
|
||||
onInput={() => loadProject()}
|
||||
/>
|
||||
</label>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTEP()}>
|
||||
Save STEP
|
||||
</a>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeSTL()}>
|
||||
Save STL
|
||||
</a>
|
||||
<a href="#" onClick={() => threejsViewport.saveShapeOBJ()}>
|
||||
Save OBJ
|
||||
</a>
|
||||
<label
|
||||
htmlFor="files"
|
||||
title="Import STEP, IGES, or (ASCII) STL from File"
|
||||
>
|
||||
Import STEP/IGES/STL
|
||||
<input
|
||||
id="files"
|
||||
name="files"
|
||||
type="file"
|
||||
accept=".iges,.step,.igs,.stp,.stl"
|
||||
multiple
|
||||
style={{ display: 'none' }}
|
||||
onInput={() => loadFiles()}
|
||||
/>
|
||||
</label>
|
||||
<a
|
||||
href="#"
|
||||
title="Clears the external step/iges/stl files stored in the project."
|
||||
onClick={() => clearExternalFiles()}
|
||||
>
|
||||
Clear Imported Files
|
||||
</a>
|
||||
<a
|
||||
href=""
|
||||
title="Resets the project and localstorage."
|
||||
onClick={() => {
|
||||
window.localStorage.clear()
|
||||
window.history.replaceState({}, 'Cascade Studio', '?')
|
||||
}}
|
||||
>
|
||||
Reset Project
|
||||
</a>
|
||||
</div>
|
||||
<div id="cascade-container" style={{ height: 'auto' }}></div>
|
||||
<footer>footer</footer>
|
||||
</div>
|
||||
</MainLayout>
|
||||
@@ -74,11 +117,7 @@ const HomePage1 = () => {
|
||||
}
|
||||
|
||||
const HomePage = () => {
|
||||
return (
|
||||
<MainLayout>
|
||||
hi
|
||||
</MainLayout>
|
||||
)
|
||||
return <MainLayout>hi</MainLayout>
|
||||
}
|
||||
|
||||
export default HomePage
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Link, routes } from '@redwoodjs/router'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import IdePartCell from 'src/components/IdePartCell'
|
||||
|
||||
const IdePartPage = ({id}) => {
|
||||
const IdePartPage = ({ id }) => {
|
||||
return (
|
||||
<MainLayout>
|
||||
<IdePartCell id={id} />
|
||||
|
||||
@@ -5,12 +5,11 @@ import { navigate, routes } from '@redwoodjs/router'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import Part2Cell from 'src/components/Part2Cell'
|
||||
|
||||
|
||||
const NewPart2Page = ({userName}) => {
|
||||
const NewPart2Page = ({ userName }) => {
|
||||
const { isAuthenticated, currentUser } = useAuth()
|
||||
useEffect(() => {!isAuthenticated &&
|
||||
navigate(routes.home())},
|
||||
[currentUser])
|
||||
useEffect(() => {
|
||||
!isAuthenticated && navigate(routes.home())
|
||||
}, [currentUser])
|
||||
return (
|
||||
<MainLayout>
|
||||
<Part2Cell
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useAuth } from '@redwoodjs/auth'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import Part2Cell from 'src/components/Part2Cell'
|
||||
|
||||
const Part2Page = ({userName, partTitle}) => {
|
||||
const Part2Page = ({ userName, partTitle }) => {
|
||||
const { currentUser } = useAuth()
|
||||
return (
|
||||
<MainLayout>
|
||||
|
||||
Reference in New Issue
Block a user