Add message for curv static image
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { MouseEventHandler, useContext } from 'react'
|
import { MouseEventHandler, useContext } from 'react'
|
||||||
import { MosaicWindowContext } from 'react-mosaic-component'
|
import { MosaicWindowContext } from 'react-mosaic-component'
|
||||||
import Svg from 'src/components/Svg/Svg'
|
import Svg from 'src/components/Svg/Svg'
|
||||||
import OpenscadStaticImageMessage from 'src/components/OpenscadStaticImageMessage/OpenscadStaticImageMessage'
|
import StaticImageMessage from 'src/components/StaticImageMessage/StaticImageMessage'
|
||||||
|
|
||||||
const PanelToolbar = ({
|
const PanelToolbar = ({
|
||||||
panelName,
|
panelName,
|
||||||
@@ -19,7 +19,7 @@ const PanelToolbar = ({
|
|||||||
<div className="absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-ch-gray-800 to-transparent" />
|
<div className="absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-ch-gray-800 to-transparent" />
|
||||||
)}
|
)}
|
||||||
<div className="absolute top-0 right-0 flex items-center h-9">
|
<div className="absolute top-0 right-0 flex items-center h-9">
|
||||||
{panelName === 'Viewer' && <OpenscadStaticImageMessage />}
|
{panelName === 'Viewer' && <StaticImageMessage />}
|
||||||
<button
|
<button
|
||||||
className={
|
className={
|
||||||
'bg-ch-gray-760 text-ch-gray-300 px-3 rounded-bl-lg h-full ' +
|
'bg-ch-gray-760 text-ch-gray-300 px-3 rounded-bl-lg h-full ' +
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import CadPackage from 'src/components/CadPackage/CadPackage'
|
|||||||
import Gravatar from 'src/components/Gravatar/Gravatar'
|
import Gravatar from 'src/components/Gravatar/Gravatar'
|
||||||
import { useIdeInit } from 'src/components/EncodedUrl/helpers'
|
import { useIdeInit } from 'src/components/EncodedUrl/helpers'
|
||||||
import ProfileViewer from '../ProfileViewer/ProfileViewer'
|
import ProfileViewer from '../ProfileViewer/ProfileViewer'
|
||||||
import OpenscadStaticImageMessage from 'src/components/OpenscadStaticImageMessage/OpenscadStaticImageMessage'
|
import StaticImageMessage from 'src/components/StaticImageMessage/StaticImageMessage'
|
||||||
import KeyValue from 'src/components/KeyValue/KeyValue'
|
import KeyValue from 'src/components/KeyValue/KeyValue'
|
||||||
|
|
||||||
const ProjectProfile = ({
|
const ProjectProfile = ({
|
||||||
@@ -81,7 +81,7 @@ const ProjectProfile = ({
|
|||||||
<div className="md:col-start-2 w-full min-h-md relative">
|
<div className="md:col-start-2 w-full min-h-md relative">
|
||||||
<ProfileViewer />
|
<ProfileViewer />
|
||||||
<div className="absolute right-0 top-0">
|
<div className="absolute right-0 top-0">
|
||||||
<OpenscadStaticImageMessage />
|
<StaticImageMessage />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
import OutBound from 'src/components/OutBound/OutBound'
|
import OutBound from 'src/components/OutBound/OutBound'
|
||||||
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
import { useIdeContext } from 'src/helpers/hooks/useIdeContext'
|
||||||
|
|
||||||
const OpenscadStaticImageMessage = () => {
|
const StaticImageMessage = () => {
|
||||||
const { state } = useIdeContext()
|
const { state } = useIdeContext()
|
||||||
if (state.ideType !== 'openscad' || state.objectData?.type !== 'png') {
|
if ((state.ideType !== 'openscad' && state.ideType !== 'curv') || state.objectData?.type !== 'png') {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return (
|
return state.ideType === 'openscad' ?
|
||||||
<OutBound
|
<OutBound
|
||||||
to="https://learn.cadhub.xyz/docs/general-cadhub/openscad-previews"
|
to="https://learn.cadhub.xyz/docs/general-cadhub/openscad-previews"
|
||||||
className="text-ch-gray-300 border-ch-gray-300 rounded-md mr-12 px-2 py-1 text-xs"
|
className="text-ch-gray-300 border-ch-gray-300 rounded-md mr-12 px-2 py-1 text-xs"
|
||||||
>
|
>
|
||||||
Why reload each camera move?
|
Why reload each camera move?
|
||||||
</OutBound>
|
</OutBound>
|
||||||
)
|
: <div className="text-ch-gray-300 border-ch-gray-300 rounded-md mr-12 px-2 py-1 text-xs">
|
||||||
|
Alpha Curv integration, no camera support currently.
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OpenscadStaticImageMessage
|
export default StaticImageMessage
|
||||||
Reference in New Issue
Block a user