second attempt
This commit is contained in:
@@ -105,18 +105,25 @@ const settingsConfig: settingsConfig[] = [
|
|||||||
{
|
{
|
||||||
title: 'Console',
|
title: 'Console',
|
||||||
name: 'console',
|
name: 'console',
|
||||||
Content: () => (
|
Content: () => {
|
||||||
<div className="p-2">
|
const { state, thunkDispatch } = useIdeContext()
|
||||||
<p>
|
return (
|
||||||
<em>Coming Soon</em>
|
<div className="p-2">
|
||||||
</p>
|
<li className="grid items-center my-2" style={{ gridTemplateColumns: 'auto 4rem' }}>
|
||||||
<hr className="my-2" />
|
<div className="text-sm">Visible</div>
|
||||||
<p className="p-2">
|
<input type="checkbox"
|
||||||
We're building configuration settings for the Viewer pane now. Join us
|
onChange={(newValue) => {
|
||||||
on <DiscordLink /> if you want to lend a hand!
|
state.consoleVisible = !state.consoleVisible
|
||||||
</p>
|
if (state.consoleVisible)
|
||||||
</div>
|
thunkDispatch({ type: 'resetLayout'})
|
||||||
),
|
else
|
||||||
|
thunkDispatch({ type: 'setLayout', payload:{ message:{ direction: 'row', first: 'Editor', second: 'Viewer'}}})
|
||||||
|
}}
|
||||||
|
checked={state.consoleVisible}/>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export interface State {
|
|||||||
isLoading: boolean
|
isLoading: boolean
|
||||||
threeInstance: RootState
|
threeInstance: RootState
|
||||||
sideTray: string[] // could probably be an array of a union type
|
sideTray: string[] // could probably be an array of a union type
|
||||||
|
consoleVisible: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const code = ''
|
const code = ''
|
||||||
@@ -93,6 +94,7 @@ export const initialState: State = {
|
|||||||
isLoading: false,
|
isLoading: false,
|
||||||
threeInstance: null,
|
threeInstance: null,
|
||||||
sideTray: [],
|
sideTray: [],
|
||||||
|
consoleVisible: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
const reducer = (state: State, { type, payload }): State => {
|
const reducer = (state: State, { type, payload }): State => {
|
||||||
|
|||||||
Reference in New Issue
Block a user