Add user menu sidebar (#195)

This commit is contained in:
Frank Noirot
2023-07-27 18:59:40 -04:00
committed by GitHub
parent 94918ccb2e
commit 894bddb369
17 changed files with 364 additions and 116 deletions

View File

@ -22,6 +22,7 @@ import { EngineCommandManager } from './lang/std/engineConnection'
import { isOverlap } from './lib/utils'
import { SetToken } from './components/TokenInput'
import { AppHeader } from './components/AppHeader'
import { isTauri } from './lib/isTauri'
import { KCLError } from './lang/errors'
export function App() {
@ -85,6 +86,7 @@ export function App() {
debugPanel: s.debugPanel,
addKCLError: s.addKCLError,
}))
const showTauriTokenInput = isTauri() && !token
// const onChange = React.useCallback((value: string, viewUpdate: ViewUpdate) => {
const onChange = (value: string, viewUpdate: ViewUpdate) => {
setCode(value)
@ -271,8 +273,7 @@ export function App() {
<AppHeader />
<ModalContainer />
<Allotment snap={true}>
<Allotment vertical defaultSizes={[5, 400, 1, 1, 200]} minSize={20}>
<SetToken />
<Allotment vertical defaultSizes={[400, 1, 1, 200]} minSize={20}>
<div className="h-full flex flex-col items-start">
<PanelHeader title="Editor" />
<button