Tweak panel toolbars
See this thread: https://discord.com/channels/775984095250612234/775984095250612240/853751444703543326 Related to #360
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Menu } from '@headlessui/react'
|
||||
|
||||
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
||||
import { useIdeContext, ideTypeNameMap } from 'src/helpers/hooks/useIdeContext'
|
||||
import Svg from 'src/components/Svg/Svg'
|
||||
import { useRender } from 'src/components/IdeWrapper/useRender'
|
||||
import { makeStlDownloadHandler, PullTitleFromFirstLine } from './helpers'
|
||||
@@ -14,30 +14,42 @@ const EditorMenu = () => {
|
||||
fileName: PullTitleFromFirstLine(state.code || ''),
|
||||
thunkDispatch,
|
||||
})
|
||||
const cadName = ideTypeNameMap[state.ideType] || ''
|
||||
const isOpenScad = state.ideType === 'openScad'
|
||||
const isCadQuery = state.ideType === 'cadQuery'
|
||||
return (
|
||||
<div className="bg-gray-500 flex items-center h-9 w-full cursor-grab">
|
||||
<div className=" text-gray-500 bg-gray-300 cursor-grab px-2 h-full flex items-center">
|
||||
<Svg name="drag-grid" className="w-4 p-px" />
|
||||
<div className="flex justify-between bg-gray-500 text-gray-100">
|
||||
<div className="flex items-center h-9 w-full cursor-grab">
|
||||
<div className=" text-gray-500 bg-gray-300 cursor-grab px-2 h-full flex items-center">
|
||||
<Svg name="drag-grid" className="w-4 p-px" />
|
||||
</div>
|
||||
<div className="flex gap-6 px-5">
|
||||
<FileDropdown
|
||||
handleRender={handleRender}
|
||||
handleStlDownload={handleStlDownload}
|
||||
/>
|
||||
<button className="cursor-not-allowed" disabled>
|
||||
Edit
|
||||
</button>
|
||||
<button className="cursor-not-allowed" disabled>
|
||||
View
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="text-gray-300 h-full cursor-not-allowed"
|
||||
aria-label="editor settings"
|
||||
disabled
|
||||
>
|
||||
<Svg name="gear" className="w-6 p-px" />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="text-gray-300 px-3 h-full cursor-not-allowed"
|
||||
aria-label="editor settings"
|
||||
disabled
|
||||
>
|
||||
<Svg name="gear" className="w-7 p-px" />
|
||||
</button>
|
||||
<div className="w-px h-full bg-gray-300" />
|
||||
<div className="flex gap-6 px-6">
|
||||
<FileDropdown
|
||||
handleRender={handleRender}
|
||||
handleStlDownload={handleStlDownload}
|
||||
<div className="flex items-center cursor-default">
|
||||
<div
|
||||
className={`${isOpenScad && 'bg-yellow-200'} ${
|
||||
isCadQuery && 'bg-blue-800'
|
||||
} w-5 h-5 rounded-full`}
|
||||
/>
|
||||
<button className="text-gray-100 cursor-not-allowed" disabled>
|
||||
Edit
|
||||
</button>
|
||||
<button className="text-gray-100 cursor-not-allowed" disabled>
|
||||
View
|
||||
</button>
|
||||
<div className="px-2">{cadName}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user