Compare commits
2 Commits
fix-editor
...
kurt-remov
Author | SHA1 | Date | |
---|---|---|---|
cf10557f65 | |||
af97256ef2 |
119
src/App.tsx
119
src/App.tsx
@ -137,62 +137,71 @@ export function App() {
|
|||||||
enableMenu={true}
|
enableMenu={true}
|
||||||
/>
|
/>
|
||||||
<ModalContainer />
|
<ModalContainer />
|
||||||
<Resizable
|
<div className="h-full">
|
||||||
className={
|
<div className="h-full flex">
|
||||||
'pointer-events-none h-full flex flex-col flex-1 z-10 my-5 ml-5 pr-1 transition-opacity transition-duration-75 ' +
|
<div className="h-full w-5 z-10 pointer-events-auto"></div>
|
||||||
paneOpacity
|
<div className="flex flex-col">
|
||||||
}
|
<div className="h-5 z-10 pointer-events-auto"></div>
|
||||||
defaultSize={{
|
<Resizable
|
||||||
width: '550px',
|
className={
|
||||||
height: 'auto',
|
'pointer-events-none h-full flex flex-col flex-1 z-10 pr-1 transition-opacity transition-duration-75 ' +
|
||||||
}}
|
+paneOpacity
|
||||||
minWidth={200}
|
}
|
||||||
maxWidth={800}
|
defaultSize={{
|
||||||
minHeight={'auto'}
|
width: '550px',
|
||||||
maxHeight={'auto'}
|
height: 'auto',
|
||||||
handleClasses={{
|
}}
|
||||||
right:
|
minWidth={200}
|
||||||
'hover:bg-chalkboard-10/50 bg-transparent transition-colors duration-75 transition-ease-out delay-100 ' +
|
maxWidth={800}
|
||||||
(buttonDownInStream || onboardingStatus === 'camera'
|
minHeight={'auto'}
|
||||||
? 'pointer-events-none '
|
maxHeight={'auto'}
|
||||||
: 'pointer-events-auto'),
|
handleClasses={{
|
||||||
}}
|
right:
|
||||||
>
|
'hover:bg-chalkboard-10/50 bg-transparent transition-colors duration-75 transition-ease-out delay-100 ' +
|
||||||
<div
|
(buttonDownInStream || onboardingStatus === 'camera'
|
||||||
id="code-pane"
|
? 'pointer-events-none '
|
||||||
className="h-full flex flex-col justify-between pointer-events-none"
|
: 'pointer-events-auto'),
|
||||||
>
|
}}
|
||||||
<CollapsiblePanel
|
>
|
||||||
title="Code"
|
<div
|
||||||
icon={faCode}
|
id="code-pane"
|
||||||
className="open:!mb-2"
|
className="h-full flex flex-col justify-between pointer-events-none"
|
||||||
open={openPanes.includes('code')}
|
>
|
||||||
menu={<CodeMenu />}
|
<CollapsiblePanel
|
||||||
>
|
title="Code"
|
||||||
<TextEditor theme={editorTheme} />
|
icon={faCode}
|
||||||
</CollapsiblePanel>
|
className="open:!mb-2"
|
||||||
<section className="flex flex-col">
|
open={openPanes.includes('code')}
|
||||||
<MemoryPanel
|
menu={<CodeMenu />}
|
||||||
theme={editorTheme}
|
>
|
||||||
open={openPanes.includes('variables')}
|
<TextEditor theme={editorTheme} />
|
||||||
title="Variables"
|
</CollapsiblePanel>
|
||||||
icon={faSquareRootVariable}
|
<section className="flex flex-col">
|
||||||
/>
|
<MemoryPanel
|
||||||
<Logs
|
theme={editorTheme}
|
||||||
theme={editorTheme}
|
open={openPanes.includes('variables')}
|
||||||
open={openPanes.includes('logs')}
|
title="Variables"
|
||||||
title="Logs"
|
icon={faSquareRootVariable}
|
||||||
icon={faCodeCommit}
|
/>
|
||||||
/>
|
<Logs
|
||||||
<KCLErrors
|
theme={editorTheme}
|
||||||
theme={editorTheme}
|
open={openPanes.includes('logs')}
|
||||||
open={openPanes.includes('kclErrors')}
|
title="Logs"
|
||||||
title="KCL Errors"
|
icon={faCodeCommit}
|
||||||
iconClassNames={{ icon: 'group-open:text-destroy-30' }}
|
/>
|
||||||
/>
|
<KCLErrors
|
||||||
</section>
|
theme={editorTheme}
|
||||||
|
open={openPanes.includes('kclErrors')}
|
||||||
|
title="KCL Errors"
|
||||||
|
iconClassNames={{ icon: 'group-open:text-destroy-30' }}
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</Resizable>
|
||||||
|
<div className="h-5 z-10 pointer-events-auto"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Resizable>
|
</div>
|
||||||
<Stream className="absolute inset-0 z-0" />
|
<Stream className="absolute inset-0 z-0" />
|
||||||
{showDebugPanel && (
|
{showDebugPanel && (
|
||||||
<DebugPanel
|
<DebugPanel
|
||||||
|
@ -39,22 +39,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.panel[open] {
|
.panel[open] {
|
||||||
@apply relative flex-grow max-h-full h-48 my-1 rounded;
|
@apply flex-grow max-h-full h-48 my-1 rounded;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Open panels have a little bit of a buffer around them
|
|
||||||
to make it harder to accidentally click or interact with the stream behind them.
|
|
||||||
The right side buffer is a little smaller so people don't get frustrated by it.
|
|
||||||
TODO: make this logic flexible for if the panel is on the right side of the screen.
|
|
||||||
*/
|
|
||||||
.panel[open]::before {
|
|
||||||
@apply absolute -inset-5 -top-2 -right-1 z-0;
|
|
||||||
@apply content-[''];
|
|
||||||
}
|
|
||||||
|
|
||||||
.panel[open]:first-of-type::before {
|
|
||||||
@apply -top-5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel[open] + .panel[open],
|
.panel[open] + .panel[open],
|
||||||
|
Reference in New Issue
Block a user