瀏覽代碼

fix: styles and missing imports (#18396)

tags/1.3.0
crazywoola 6 月之前
父節點
當前提交
93c1ee225e
No account linked to committer's email address

+ 6
- 5
web/app/components/base/markdown-blocks/music.tsx 查看文件

useEffect(() => { useEffect(() => {
if (containerRef.current && controlsRef.current) { if (containerRef.current && controlsRef.current) {
if (typeof children === 'string') { if (typeof children === 'string') {
const visualObjs = abcjs.renderAbc(containerRef.current, children)
const visualObjs = abcjs.renderAbc(containerRef.current, children, {
add_classes: true, // Add classes to SVG elements for cursor tracking
responsive: 'resize', // Make notation responsive
})
const synthControl = new abcjs.synth.SynthController() const synthControl = new abcjs.synth.SynthController()
synthControl.load(controlsRef.current, {}, { displayPlay: true }) synthControl.load(controlsRef.current, {}, { displayPlay: true })
const synth = new abcjs.synth.CreateSynth() const synth = new abcjs.synth.CreateSynth()
}, [children]) }, [children])


return ( return (
<div style={{ minHeight: '350px', minWidth: '100%', overflow: 'auto' }}>
<div style={{ minWidth: '100%', overflow: 'auto' }}>
<div ref={containerRef} /> <div ref={containerRef} />
<div
ref={controlsRef}
/>
<div ref={controlsRef} />
</div> </div>
) )
} }

+ 5
- 5
web/app/components/workflow/panel/debug-and-preview/index.tsx 查看文件

import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { useNodes } from 'reactflow' import { useNodes } from 'reactflow'
import { import {
useEdgesInteractions,
useNodesInteractions,
useWorkflowInteractions, useWorkflowInteractions,
} from '../../hooks' } from '../../hooks'
import { useEdgesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-edges-interactions-without-sync'
import { useNodesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-nodes-interactions-without-sync'
import { BlockEnum } from '../../types' import { BlockEnum } from '../../types'
import type { StartNodeType } from '../../nodes/start/types' import type { StartNodeType } from '../../nodes/start/types'
import ChatWrapper from './chat-wrapper' import ChatWrapper from './chat-wrapper'
const { t } = useTranslation() const { t } = useTranslation()
const chatRef = useRef({ handleRestart: noop }) const chatRef = useRef({ handleRestart: noop })
const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions() const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions()
const { handleNodeCancelRunningStatus } = useNodesInteractions()
const { handleEdgeCancelRunningStatus } = useEdgesInteractions()
const { handleNodeCancelRunningStatus } = useNodesInteractionsWithoutSync()
const { handleEdgeCancelRunningStatus } = useEdgesInteractionsWithoutSync()
const varList = useStore(s => s.conversationVariables) const varList = useStore(s => s.conversationVariables)
const [expanded, setExpanded] = useState(true) const [expanded, setExpanded] = useState(true)
const nodes = useNodes<StartNodeType>() const nodes = useNodes<StartNodeType>()
<RiEqualizer2Line className='h-4 w-4' /> <RiEqualizer2Line className='h-4 w-4' />
</ActionButton> </ActionButton>
</Tooltip> </Tooltip>
{expanded && <div className='absolute bottom-[-17px] right-[5px] z-10 h-3 w-3 rotate-45 border-l-[0.5px] border-t-[0.5px] border-components-panel-border-subtle bg-components-panel-on-panel-item-bg'/>}
{expanded && <div className='absolute bottom-[-17px] right-[5px] z-10 h-3 w-3 rotate-45 border-l-[0.5px] border-t-[0.5px] border-components-panel-border-subtle bg-components-panel-on-panel-item-bg' />}
</div> </div>
)} )}
<div className='mx-3 h-3.5 w-[1px] bg-divider-regular'></div> <div className='mx-3 h-3.5 w-[1px] bg-divider-regular'></div>

Loading…
取消
儲存